Commit graph

622 commits

Author SHA1 Message Date
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Nikita Popov
fbf2914e1f Merge branch 'PHP-7.3' 2018-11-26 22:49:29 +01:00
Nikita Popov
fb18b8bdf6 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-26 22:49:18 +01:00
Colin Basnett
9ec519e094 Fixed bug #77184
The U in URATIONAL is for unsigned, so the values should be printed
as unsigned.
2018-11-26 22:48:48 +01:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Stanislav Malyshev
28d8b8de71 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:54:31 -07:00
Stanislav Malyshev
a536d6d61b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:53:57 -07:00
Stanislav Malyshev
4e92cd172a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:52:36 -07:00
Stanislav Malyshev
bddf8140e4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 15:13:13 -07:00
Stanislav Malyshev
3462efa386 Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
Use MAKERNOTE length as data size.
2018-07-16 14:17:51 -07:00
Stanislav Malyshev
1baeae4270 Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c 2018-07-16 14:16:58 -07:00
Dmitry Stogov
265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Christoph M. Becker
eed3637d84 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #76409: heap use after free in _php_stream_free
2018-06-09 17:57:10 +02:00
Christoph M. Becker
3fdde65617 Fix #76409: heap use after free in _php_stream_free
We must not close the stream in exif_read_from_impl(), since it is the
responsibility of the (caller's) caller to do so, if it actually opened
the stream.

We simplify the reproduce script, which is actually about supplying a
path to a directory (opposed to a regular file), and use `.` instead of
`/` to also make it work on Windows.
2018-06-09 17:52:05 +02:00
Peter Kokot
7bb741cad9 Remove exif version from the phpinfo output
This patch removes the exif version in the phpinfo output to sync it
with the rest of the php bundled extensions. Also in the past the
revision id from the version control system was used and is today not
needed anymore.
2018-06-09 15:32:21 +02:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Stanislav Malyshev
99f1d904a0 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 22:04:22 -07:00
Stanislav Malyshev
4c06d929c0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 22:03:33 -07:00
Stanislav Malyshev
95ee9efa57 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 22:00:24 -07:00
Stanislav Malyshev
5a18d7a0df Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 21:59:57 -07:00
Christoph M. Becker
b4e4788c44 Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
The MakerNote is not necessarily null-terminated, so we must not use
`strlen()` to avoid OOB reads.  Instead `php_strnlen()` is the proper
way to handle this.
2018-04-22 20:15:02 -07:00
Christoph M. Becker
7c65345e18 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #76164: exif_read_data zend_mm_heap corrupted
2018-04-12 23:02:07 +02:00
Christoph M. Becker
281a1754b9 Fix #76164: exif_read_data zend_mm_heap corrupted
We must not release parsed parameters ourselves, since this is already
done by the engine.
2018-04-12 23:00:37 +02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Kalle Sommer Nielsen
b7a5e71a33 These functions are always available, exif can't be cross version compiled anyway 2017-10-31 08:50:30 +01:00
Kalle Sommer Nielsen
6b88b3bc25 Fix compiler warnings 2017-10-29 16:43:21 +01:00
Kalle Sommer Nielsen
85fa3aa4c0 We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway 2017-10-29 16:42:13 +01:00
Kalle Sommer Nielsen
09f829d996 Remove these old comments, as for the TODO, there is already a FR for this 2017-10-29 16:36:34 +01:00
Anatol Belski
ce1a0d971b fix NULL deref 2017-08-01 11:55:32 +02:00
Kalle Sommer Nielsen
4d684a6cd7 WS 2017-07-14 03:42:15 +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
f7d9f6456c Turn off EXIF_DEBUG so Travis don't complain at me 2017-07-14 01:18:58 +02:00
Kalle Sommer Nielsen
bf7f6f9078 Don't add a new line to undefined tags in EXIF_DEBUG mode 2017-07-14 01:17:34 +02:00
Kalle Sommer Nielsen
9cf586cdfb Fix compile error with EXIF_DEBUG 2017-07-14 01:12:00 +02:00
Dmitry Stogov
2b7d3fb45f Fixed compilation error 2017-07-12 09:46:22 +03:00
Kalle Sommer Nielsen
7845182edd Remove debug code 2017-07-12 06:12:07 +02:00
Kalle Sommer Nielsen
363bb03b7e We need to check for the length here too, or we crash and no one likes that! :( 2017-07-12 06:11:14 +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
7bb696dc49 Silent compiler warning 2017-07-08 19:05:28 +02:00
Kalle Sommer Nielsen
ba28d75c2c Deprecated the read_exif_data() alias 2017-07-08 15:02:05 +02:00
Kalle Sommer Nielsen
134047dfde We currently don't use the guessing code, so don't compile it 2017-07-07 12:23:24 +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
cd8d0aad7f Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with other exif readers)) 2017-07-07 11:29:23 +02:00