1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Commit Graph

143 Commits

Author SHA1 Message Date
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Stanislav Malyshev
3616b6b935 Cleanup some tests - remove unnecessary sections
Also unify credits - all are under --CREDITS-- now.
2018-02-04 02:21:40 -08:00
Christoph M. Becker
9c006651c4 Test requires mbstring – skip if not available 2017-10-11 15:27:56 +02:00
Anatol Belski
29ab1dc95a Merge branch 'PHP-7.2'
* PHP-7.2:
  Test to cover the change in ce1a0d97
2017-08-01 12:51:56 +02:00
Anatol Belski
b8da481a2a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Test to cover the change in ce1a0d97
2017-08-01 12:51:20 +02:00
Anatol Belski
d9d152b895 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test to cover the change in ce1a0d97
2017-08-01 12:50:52 +02:00
Anatol Belski
a8e25fdbf8 Test to cover the change in ce1a0d97 2017-08-01 12:49:45 +02:00
Anatol Belski
f30506c8ff Merge branch 'PHP-7.2'
* PHP-7.2:
  fix test
  fix NULL deref
2017-08-01 12:02:16 +02:00
Anatol Belski
2164e3a0b8 fix test 2017-08-01 11:56:23 +02:00
Kalle Sommer Nielsen
c62e5eb0a9 Reduce EXIF test image sizes, there is still one large image left that I will look into reducing if possible (bug50845.jpg)
The changes in phpts are due to exiftool, I verified that all the images still remain relevant for testing
2017-07-30 21:59:55 +02:00
Kalle Sommer Nielsen
97ff7bbb36 Lowercase the file extension 2017-07-30 21:59:10 +02:00
Kalle Sommer Nielsen
a7484beea2 Reduce EXIF test image sizes, there is still one large image left that I will look into reducing if possible (bug50845.jpg)
The changes in phpts are due to exiftool, I verified that all the images still remain relevant for testing
2017-07-30 21:49:02 +02:00
Kalle Sommer Nielsen
f6ea75da12 Lowercase the file extension 2017-07-30 21:30:33 +02:00
Kalle Sommer Nielsen
b613392003 Test case for bug #64739 2017-07-21 21:55:11 +02:00
Kalle Sommer Nielsen
333c362178 Fix test title 2017-07-14 02:02:25 +02:00
Kalle Sommer Nielsen
997e2e5452 Ensure that the stream position is kept between reads 2017-07-14 01:59:23 +02:00
Kalle Sommer Nielsen
969eb8345b * Implemented #65187 (exif_read_data/thumbnail: add support for stream resource)
* ext/exif now uses FAST_ZPP
2017-07-12 05:43:50 +02:00
Kalle Sommer Nielsen
38d019979e Fix test 2017-07-08 18:01:51 +02:00
Kalle Sommer Nielsen
ba28d75c2c Deprecated the read_exif_data() alias 2017-07-08 15:02:05 +02:00
Kalle Sommer Nielsen
106386dd98 Fixed file name for case sensitive file systems 2017-07-08 03:34:30 +02:00
Kalle Sommer Nielsen
469206c84e Added test case for bug #73115 which was fixed by recently fixed bugs 2017-07-08 03:30:46 +02:00
Kalle Sommer Nielsen
e6903d471e * Fixed bug #72819 (EXIF thumbnails not read anymore)
* Fixed bug #62523 (php crashes with segfault when exif_read_data called)
* Fixed the poor test case for #62523, which was a HTML document

Fixing #72819 had the side effect of fixing #62523 by supporting the format as seen in bug62523_1.phpt
2017-07-07 12:20:05 +02:00
Kalle Sommer Nielsen
babc3c522f This should be EXPECT instead of EXPECTF 2017-07-07 11:31:31 +02:00
Kalle Sommer Nielsen
cd8d0aad7f Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with other exif readers)) 2017-07-07 11:29:23 +02:00
Kalle Sommer Nielsen
900ce92c9a Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with correct exif format) 2017-07-07 10:20:02 +02:00
Stanislav Malyshev
ca6f679417 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test
2017-01-15 18:42:44 -08:00
Stanislav Malyshev
2c7909697a Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix test
2017-01-15 18:42:33 -08:00
Stanislav Malyshev
814966ad33 Fix test 2017-01-15 18:42:22 -08:00
Mitch Hagstrand
54404808ab Fix overrun in exif's "Illegal components" error message.
The variables "components" is an integer, but is being
output as long. As a result it is printing 8 bytes
instead of 4 bytes.
2017-01-04 17:44:00 -08:00
Christoph M. Becker
0c10ddb851 Make test case even more resilient
The `components` value may obviously be negative, so we have to cater
to that.
2017-01-04 11:46:35 +01:00
Christoph M. Becker
a793b794a6 Make test case more resilient
We should not expect a certain `components` value, but rather any
integer.
2017-01-04 00:51:35 +01:00
Christoph M. Becker
a055ab76c7 Fix failing test
Due to commit 17408238 the tested TIFF file produces an additional
warning.
2017-01-03 16:40:41 +01:00
Stanislav Malyshev
0de25147d3 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #73737 FPE when parsing a tag format
  Fix bug #73773 - Seg fault when loading hostile phar
  Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
  Fix bug #73768 - Memory corruption when loading hostile phar
  Fix int overflows in phar (bug #73764)
2017-01-02 21:26:20 -08:00
Stanislav Malyshev
2075fb2b73 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73737 FPE when parsing a tag format
  Fix bug #73773 - Seg fault when loading hostile phar
  Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
  Fix bug #73768 - Memory corruption when loading hostile phar
  Fix int overflows in phar (bug #73764)
2017-01-02 21:07:01 -08:00
Stanislav Malyshev
7f0de1a138 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #73737 FPE when parsing a tag format
  Fix bug #73773 - Seg fault when loading hostile phar
  Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
  Fix bug #73768 - Memory corruption when loading hostile phar
  Fix int overflows in phar (bug #73764)
2017-01-02 21:01:35 -08:00
Stanislav Malyshev
1cda0d7c2f Fix bug #73737 FPE when parsing a tag format 2016-12-31 19:31:49 -08:00
Christoph M. Becker
1ccada35c0 Fix tests: don't count non-countables 2016-11-13 18:16:17 +01:00
Xinchen Hui
660d8f1622 Merge branch 'PHP-7.1'
* PHP-7.1: (49 commits)
  Update NEWs
  Update NEWs
  Unused label
  Fixed bug #72853 (stream_set_blocking doesn't work)
  fix test
  Bug #72663 - part 3
  Bug #72663 - part 2
  Bug #72663 - part 1
  Update NEWS
  BLock test with memory leak
  fix tests
  Fix TSRM build
  Fix bug #72850 - integer overflow in uuencode
  Fixed bug #72849 - integer overflow in urlencode
  Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
  Fix bug #72838 - 	Integer overflow lead to heap corruption in sql_regcase
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72836 - integer overflow in base64_decode caused heap corruption
  Fix for bug #72807 - do not produce strings with negative length
  Fix for bug #72790 and bug #72799
  ...
2016-08-17 17:15:11 +08:00
Xinchen Hui
ce6ad9bdd9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: (48 commits)
  Update NEWs
  Unused label
  Fixed bug #72853 (stream_set_blocking doesn't work)
  fix test
  Bug #72663 - part 3
  Bug #72663 - part 2
  Bug #72663 - part 1
  Update NEWS
  BLock test with memory leak
  fix tests
  Fix TSRM build
  Fix bug #72850 - integer overflow in uuencode
  Fixed bug #72849 - integer overflow in urlencode
  Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
  Fix bug #72838 - 	Integer overflow lead to heap corruption in sql_regcase
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72836 - integer overflow in base64_decode caused heap corruption
  Fix for bug #72807 - do not produce strings with negative length
  Fix for bug #72790 and bug #72799
  Fix bug #72730 - imagegammacorrect allows arbitrary write access
  ...

Conflicts:
	ext/standard/var_unserializer.c
2016-08-17 17:14:30 +08:00
Stanislav Malyshev
6dbb1ee46b Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF 2016-08-16 22:55:40 -07:00
Stanislav Malyshev
24fb60ffe9 Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
(cherry picked from commit 620b01337cc39f856ca68c34c35e154f5f0682fc)

Conflicts:
	ext/exif/exif.c
2016-08-16 15:04:16 +02:00
Kalle Sommer Nielsen
af56fed73b Fixed bug #71534 (Type confusion in exif_read_data() leading to heap overflow in debug mode)
Unlike the original patch, this does not return an unknown format in case an unsigned compatible type cannot be found (cases for SINGLE and DOUBLE removed), as these seems rare cases according to the inline comments.

Note, the test does not test if PHP is in debug mode, although the report originally states it only occurs there only.

The fix is based on a patch by hlt99 at blinkenshell dot org
2016-08-07 05:35:46 +02:00
Kalle Sommer Nielsen
8ac784ff13 Fix tests, although I was not able to reproduce these failures on an x86 build/Windows, this should hopefully make travis happy 2016-08-07 04:22:27 +02:00
Kalle Sommer Nielsen
1740823864 Fixed bug #68547 (Exif Header component value check error) (Patch by sjh21a at gmail dot com)
This patch changes processing a little and causes some crafted tags to not be parsed and generate a warning.

This is a slight BC break from earlier versions, since it will no longer return the tags of that it was mismatching (see bug68799.phpt), namely the "WINXP" section and the "Author" tag is no longer returned due to this. Although this BC break is merely only for crafted tags, this can also have some real life effects on pictures re-saved from editors that can cause bad exif data writes, so lets keep it here.
2016-08-05 10:03:14 +02:00
Kalle Sommer Nielsen
aaa136e25d Added support for Sony pictures in EXIF as per requested in bug #72735
Sony is a little more interesting, as it is have a large range of tags it support in different models. For now I have added all the tags found within the Exif.Sony1 namespace.
2016-08-05 07:45:02 +02:00
Kalle Sommer Nielsen
93c0e97602 Split this test up to a 64bit version for more coverage
The 32bit version does not have the 64bit float values here, we already have 3 float tests which I guess will do for now at least
2016-08-05 07:15:34 +02:00
Nikita Popov
65b6f2013b Fix exif_imagetype() test after zpp change 2016-08-04 22:27:42 +02:00
Remi Collet
456e10eb9b - add a test for makernote (#72682)
- reduce image size
- add panasonic.jpg sample
2016-08-03 18:33:26 +02:00
Kalle Sommer Nielsen
fbb1690198 Fixed Redhat bug #1362571 (PHP not returning full results for exif_read_data function)
There are two factors for this bug fix:
 - First of all, the maximum nesting level has been increased to 150 (previously 100), I'm not sure how much an impact this will have, but increasing this value also seems to resolve PHP bug #66443 (Corrupt EXIF header: maximum directory nesting level reached for some cameras.)
  - Second, this adds support for most common Panasonic EXIF tags, again this list is based off the Exiv2 website

Note about Panasonic's format:
From what I could find, then the offset was always 12 bytes for such, the signature always had the 'P' capitalized, and the rest lower cased, followed by 3 NULL bytes

@Remi, can you review this? I'm gonna look into Sony (which is huge btw!) and your patch next
2016-08-03 11:59:30 +02:00