Skip to content

Commit f238665

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: exif: Fix possible memory leak when tag is empty
2 parents d63be3f + d1018be commit f238665

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/exif/exif.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,6 +3261,7 @@ static bool exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * val
32613261

32623262
#define REQUIRE_NON_EMPTY() do { \
32633263
if (byte_count == 0) { \
3264+
EFREE_IF(outside); \
32643265
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Cannot be empty", tag, exif_get_tagname_debug(tag, tag_table)); \
32653266
return false; \
32663267
} \

0 commit comments

Comments
 (0)