summaryrefslogtreecommitdiff
path: root/png
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-07-19 13:48:43 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-07-19 13:48:43 +0200
commit1e890ea4e4ba00a66743cc97b89dfd4991167ce1 (patch)
treecf6248fa025b4ab25c19044c25f669e8278c83d8 /png
parentd331a697edda0fb8d11ebafc890ad5ea3803a0b4 (diff)
Fix libpng compilation warning (#757)
According to the reported issue this warning appears when using gcc 13.1.0 (rev7, MinGW-W64). it's very likely a new warning and a false positive because the buffer is used as an output parameter, but anyway.
Diffstat (limited to 'png')
-rw-r--r--png/pngerror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/png/pngerror.c b/png/pngerror.c
index ec3a709b9..be324458d 100644
--- a/png/pngerror.c
+++ b/png/pngerror.c
@@ -255,7 +255,7 @@ void
png_warning_parameter_unsigned(png_warning_parameters p, int number, int format,
png_alloc_size_t value)
{
- char buffer[PNG_NUMBER_BUFFER_SIZE];
+ char buffer[PNG_NUMBER_BUFFER_SIZE] = {0}; /* FLTK Issue #757 */
png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value));
}
@@ -265,7 +265,7 @@ png_warning_parameter_signed(png_warning_parameters p, int number, int format,
{
png_alloc_size_t u;
png_charp str;
- char buffer[PNG_NUMBER_BUFFER_SIZE];
+ char buffer[PNG_NUMBER_BUFFER_SIZE] = {0}; /* FLTK Issue #757 */
/* Avoid overflow by doing the negate in a png_alloc_size_t: */
u = (png_alloc_size_t)value;