commit 29b129ace10a4d86725fce6667f42a6d0bd04b13
parent fa9485966d31c071761f08e81f875535f9908ba3
Author: sin <sin@2f30.org>
Date: Tue, 29 Jul 2014 12:24:24 +0100
Ensure that png_row is NULL
If we fail early, the call to free(png_row) could crash because
of an uninitialized (non-NULL) png_row.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/if2png.c b/if2png.c
@@ -25,7 +25,7 @@ main(int argc, char *argv[])
{
png_structp png_struct_p;
png_infop png_info_p;
- uint8_t hdr[17], *png_row;
+ uint8_t hdr[17], *png_row = NULL;
png_uint_32 width, height, i;
png_size_t png_row_len;