[libpng16] Restored previous handling of negative input to png_set_sig_bytes().

This commit is contained in:
Glenn Randers-Pehrson
2015-08-17 21:56:03 -05:00
parent 5a26171dd7
commit 6530e3898d
3 changed files with 3 additions and 8 deletions

3
png.c
View File

@@ -33,6 +33,9 @@ png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
if (png_ptr == NULL)
return;
if (num_bytes < 0)
nb = 0;
if (nb > 8)
png_error(png_ptr, "Too many bytes for PNG signature");