mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[Libpng16] Relocated setting free_me for eXIf data, to stop an OSS-fuzz leak.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user