Skip to content

Commit d1018be

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: exif: Fix possible memory leak when tag is empty
2 parents 4b0ad46 + 56af25c commit d1018be

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
. Partially fixed bug GH-16317 (DOM classes do not allow
1515
__debugInfo() overrides to work). (nielsdos)
1616

17+
- Exif:
18+
. Fix possible memory leak when tag is empty. (nielsdos)
19+
1720
- FPM:
1821
. Fixed bug GH-19974 (fpm_status_export_to_zval segfault for parallel
1922
execution). (Jakub Zelenka, txuna)

ext/exif/exif.c

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

32503250
#define REQUIRE_NON_EMPTY() do { \
32513251
if (byte_count == 0) { \
3252+
EFREE_IF(outside); \
32523253
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)); \
32533254
return false; \
32543255
} \

0 commit comments

Comments
 (0)