summaryrefslogtreecommitdiff
path: root/if2png.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-07-29 12:24:24 +0100
committersin <sin@2f30.org>2014-07-29 12:24:24 +0100
commit29b129ace10a4d86725fce6667f42a6d0bd04b13 (patch)
treedb30ca321aea4eddd9ee300bb02047de2e50a155 /if2png.c
parentfa9485966d31c071761f08e81f875535f9908ba3 (diff)
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 (limited to 'if2png.c')
-rw-r--r--if2png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/if2png.c b/if2png.c
index 030e9ad..a27b4bc 100644
--- 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;