summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-05 19:58:41 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-05 19:58:41 -0500
commit1ebe4f75cc71de97bd97b8bd7347224e004fb2fe (patch)
tree7450fe9fc20a9276bc3cd7c453dd37208a5c5576 /pngrutil.c
parent13bc0b6b1f8f2f2491fcc9f0c1c939ff06e13c15 (diff)
[Libpng16] Relocated setting free_me for eXIf data, to stop an OSS-fuzz leak.
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pngrutil.c b/pngrutil.c
index 6938d93c3..81c67ae7d 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -2030,6 +2030,8 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
return;
}
+ info_ptr->free_me |= PNG_FREE_EXIF;
+
info_ptr->eXIf_buf = png_voidcast(png_bytep,
png_malloc_warn(png_ptr, length));
@@ -2040,7 +2042,6 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
return;
}
- info_ptr->free_me |= PNG_FREE_EXIF;
for (i = 0; i < length; i++)
{
png_byte buf[1];