Fix off by 1 memory access in Canny