Menu

#258 png_read_png can leave some row bits uninitialized.

libpng_code
open
nobody
None
5
2016-12-16
2016-12-16
No

Hi... When reading in an image whose row width in bits isn't divisible by 8, the simple API seems to leave some bits at the end uninitialized. That means that if one e.g. memcpy's the rows and the png_writes it, the result is non-deterministic. That seems like it might be unintentional.

See attached testcase, it expects http://www.schaik.com/pngsuite/s02i3p01.png as test data. This was seens with 1.6.26 on Debian Sid.

I think https://sourceforge.net/p/libpng/code/ci/libpng16/tree/pngrutil.c#l3539 might be the bit of code that's doing it.

Thanks!

1 Attachments

Discussion


Log in to post a comment.

MongoDB Logo MongoDB