diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-01-23 22:34:15 -0600 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-01-23 22:34:15 -0600 |
commit | 2312167d514e5e815efe01edb67c59b680ea7f9b (patch) | |
tree | b847d2c0bf605d5f885dc65c70c26cd36b61af6c /pngerror.c | |
parent | edbcd0213341dc20dbf8cd941a4ee4379f4a3151 (diff) | |
download | libpng-2312167d514e5e815efe01edb67c59b680ea7f9b.tar.gz |
[libpng16] Increased warning buffer in pngerror.c from 128 to 192.
Diffstat (limited to 'pngerror.c')
-rw-r--r-- | pngerror.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pngerror.c b/pngerror.c index f9861f6e4..631b80e6a 100644 --- a/pngerror.c +++ b/pngerror.c @@ -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 |