mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.2' into PHP-7.3
This commit is contained in:
commit
c553d17f11
4 changed files with 25 additions and 0 deletions
3
NEWS
3
NEWS
|
@ -14,6 +14,9 @@ PHP NEWS
|
|||
. Fixed bug #77530 (PHP crashes when parsing `(2)::class`). (Ekin)
|
||||
. Fixed bug #77546 (iptcembed broken function). (gdegoulet)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug #77564 (Memory leak in exif_process_IFD_TAG). (Ben Ramsey)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #77514 (mb_ereg_replace() with trailing backslash adds null byte).
|
||||
(Nikita)
|
||||
|
|
|
@ -3378,6 +3378,10 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
|||
break;
|
||||
|
||||
case TAG_USERCOMMENT:
|
||||
EFREE_IF(ImageInfo->UserComment);
|
||||
ImageInfo->UserComment = NULL;
|
||||
EFREE_IF(ImageInfo->UserCommentEncoding);
|
||||
ImageInfo->UserCommentEncoding = NULL;
|
||||
ImageInfo->UserCommentLength = exif_process_user_comment(ImageInfo, &(ImageInfo->UserComment), &(ImageInfo->UserCommentEncoding), value_ptr, byte_count);
|
||||
break;
|
||||
|
||||
|
|
BIN
ext/exif/tests/bug77564/bug77564.jpg
Normal file
BIN
ext/exif/tests/bug77564/bug77564.jpg
Normal file
Binary file not shown.
18
ext/exif/tests/bug77564/bug77564.phpt
Normal file
18
ext/exif/tests/bug77564/bug77564.phpt
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue