[libpng16] Increased warning buffer in pngerror.c from 128 to 192.

This commit is contained in:
Glenn Randers-Pehrson
2012-01-23 22:34:15 -06:00
parent edbcd02133
commit 2312167d51
3 changed files with 12 additions and 8 deletions

View File

@@ -283,11 +283,13 @@ void
png_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p,
png_const_charp message)
{
/* The internal buffer is just 128 bytes - enough for all our messages,
* overflow doesn't happen because this code checks!
/* The internal buffer is just 192 bytes - enough for all our messages,
* overflow doesn't happen because this code checks! If someone figures
* out how to send us a message longer than 192 bytes, all that will
* happen is that the message will be truncated appropriately.
*/
size_t i = 0; /* Index in the msg[] buffer: */
char msg[128];
char msg[192];
/* Each iteration through the following loop writes at most one character
* to msg[i++] then returns here to validate that there is still space for