'(k * (ww) + ii)' overrun allocated buffer (k = height - 1, ii = ww)
Attach a file by drag & drop or click to upload