-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #77564: Memory leak in exif_process_IFD_TAG
The memory leak occurs when more than one UserComment tag is present in the EXIF data. It's still considered corrupt EXIF data, but this ensures the memory is freed before trying to set to already allocated memory.
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Bug 77564 (Memory leak in exif_process_IFD_TAG) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> | ||
--FILE-- | ||
<?php | ||
var_dump(exif_read_data(dirname(__FILE__) . '/bug77564.jpg')); | ||
?> | ||
DONE | ||
--EXPECTF-- | ||
|
||
Warning: exif_read_data(bug77564.jpg): Illegal IFD offset in %sbug77564.php on line %d | ||
|
||
Warning: exif_read_data(bug77564.jpg): File structure corrupted in %sbug77564.php on line %d | ||
|
||
Warning: exif_read_data(bug77564.jpg): Invalid JPEG file in %sbug77564.php on line %d | ||
bool(false) | ||
DONE |