com php-src: Revert "Fixed bug #72735 (Samsung picture thumb not read (zero size))": ext/exif/exif.c ext/exif/tests/bug72735/bug72735.phpt
ext/exif/tests/bug72735/nokia.jpg ext/exif/tests/bug72735/samsung.jpg
| From: | Kalle Sommer Nielsen | Date: | Wed, 03 Aug 2016 04:10:56 +0000 |
| Subject: | com php-src: Revert "Fixed bug #72735 (Samsung picture thumb not read (zero size))": ext/exif/exif.c ext/exif/tests/bug72735/bug72735.phpt ext/exif/tests/bug72735/nokia.jpg ext/exif/tests/bug72735/samsung.jpg |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93546@lists.php.net to get a copy of this message | ||
Commit: aa821d8cad082634c554c6a5ed9233cdc24b9cff
Author: Kalle Sommer Nielsen <kalle@php.net> Wed, 3 Aug 2016 06:10:56 +0200
Parents: 406dff2a02ff1cfac89942ce5e991d88d3b6cb50
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aa821d8cad082634c554c6a5ed9233cdc24b9cff
Log:
Revert "Fixed bug #72735 (Samsung picture thumb not read (zero size))"
This reverts commit 406dff2a02ff1cfac89942ce5e991d88d3b6cb50.
This seems to break more than expected and other tests seems to fail:
- bug60150.phpt
- bug62523_2.phpt
- bug72603.phpt
- bug72618.phpt
I'm gonna go do around of thinking and see if I can come up with a better fix
Bugs:
https://bugs.php.net/72735
https://bugs.php.net/60150
https://bugs.php.net/62523
https://bugs.php.net/72603
https://bugs.php.net/72618
Changed paths:
M ext/exif/exif.c
D ext/exif/tests/bug72735/bug72735.phpt
D ext/exif/tests/bug72735/nokia.jpg
D ext/exif/tests/bug72735/samsung.jpg
Diff:
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 9e4c14a..9f951d7 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -3152,7 +3152,7 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char
*dir_start,
for (de=0;de<NumDirEntries;de++) {
if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
offset_base, IFDlength, displacement, section_index, 1,
exif_get_tag_table(section_index))) {
- continue;
+ return FALSE;
}
}
/*
@@ -3430,6 +3430,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo)
if ((itemlen - 2) < 6) {
return FALSE;
}
+
exif_process_SOFn(Data, marker, &sof_info);
ImageInfo->Width = sof_info.width;
ImageInfo->Height = sof_info.height;
diff --git a/ext/exif/tests/bug72735/bug72735.phpt b/ext/exif/tests/bug72735/bug72735.phpt
deleted file mode 100644
index 4a8d360..0000000
--- a/ext/exif/tests/bug72735/bug72735.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-Bug #72735 (Samsung picture thumb not read (zero size))
---SKIPIF--
-<?php if (!extension_loaded('exif')) print 'skip exif extension not
available';?>
---FILE--
-<?php
-foreach (['nokia.jpg', 'samsung.jpg'] as $picture) {
- $len = strlen(exif_thumbnail(__DIR__ . '/' .. $picture));
-
- if ($len === 0) {
- echo $picture . ': error, no thumbnail length', PHP_EOL;
-
- continue;
- }
-
- echo $picture . ': int(' . $len . ')', PHP_EOL;
-}
-?>
---EXPECTF--
-nokia.jpg: int(%d)
-samsung.jpg: int(%d)
diff --git a/ext/exif/tests/bug72735/nokia.jpg b/ext/exif/tests/bug72735/nokia.jpg
deleted file mode 100644
index 48367bf..0000000
Binary files a/ext/exif/tests/bug72735/nokia.jpg and /dev/null differ
diff --git a/ext/exif/tests/bug72735/samsung.jpg b/ext/exif/tests/bug72735/samsung.jpg
deleted file mode 100644
index 7009606..0000000
Binary files a/ext/exif/tests/bug72735/samsung..jpg and /dev/null differ