fix(test): Avoid an over-read in the low-bit-depth sBIT check
For images with sBIT chunks the test program contrib/libtests/pngimage
runs two nested for loops, one over the pixels another over the bytes in
a pixel.
With low bit depth grayscale images the per-pixel loop needs to advance
by more than one for each iteration because the sub-loop checks a whole
byte therefore checks multiple pixels.
Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
1 file changed