Commit graph

601 commits

Author SHA1 Message Date
Christoph M. Becker
01a4de5c58 Pointer arithmetic on void pointers is illegal
We quick-fix this by casting to char*; it might be more appropriate to
use char pointers in the first place.
2019-04-02 10:39:44 +02:00
Stanislav Malyshev
bef66e1b6f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
2019-04-02 00:13:11 -07:00
Stanislav Malyshev
c0af0ae5a4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
2019-04-02 00:13:06 -07:00
Stanislav Malyshev
da5fbb8c36 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
2019-04-02 00:13:00 -07:00
Stanislav Malyshev
c83af86f8b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
2019-04-02 00:12:54 -07:00
Stanislav Malyshev
887a7b5714 Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF 2019-04-02 00:12:26 -07:00
Stanislav Malyshev
a1631ac57b Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s 2019-03-31 23:11:34 -07:00
Stanislav Malyshev
f45e7861ef Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s
2019-03-31 23:10:04 -07:00
Stanislav Malyshev
9efaac30ae Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s
2019-03-31 23:09:57 -07:00
Stanislav Malyshev
f3ab302270 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s
2019-03-31 23:09:18 -07:00
Stanislav Malyshev
f3aefc6d07 Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s 2019-03-31 23:09:06 -07:00
Stanislav Malyshev
b82437eedd Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
Also fix for bug #77659
2019-03-03 23:34:00 -08:00
Stanislav Malyshev
30d2b94a2e Fix bug #77540 - Invalid Read on exif_process_SOFn 2019-03-03 23:34:00 -08:00
Stanislav Malyshev
46e79c9351 Fix integer overflows on 32-bits 2019-03-03 23:34:00 -08:00
Stanislav Malyshev
534a18c08f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS
  Fix test error message
  Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
  Fix bug #77540 - Invalid Read on exif_process_SOFn
  Fix integer overflows on 32-bits
  Fix #77431 SplFileInfo::__construct() accepts NUL bytes
  Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
2019-03-03 22:20:49 -08:00
Stanislav Malyshev
e3f7c352dc Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fix test error message
  Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
  Fix bug #77540 - Invalid Read on exif_process_SOFn
  Fix integer overflows on 32-bits
  Fix #77431 SplFileInfo::__construct() accepts NUL bytes
  Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
2019-03-03 22:20:42 -08:00
Stanislav Malyshev
8363df3703 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix test error message
  Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
  Fix bug #77540 - Invalid Read on exif_process_SOFn
  Fix integer overflows on 32-bits
  Fix #77431 SplFileInfo::__construct() accepts NUL bytes
  Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
2019-03-03 22:20:35 -08:00
Stanislav Malyshev
8ac6fee856 Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
Also fix for bug #77659
2019-03-03 18:35:43 -08:00
Stanislav Malyshev
5f0e62a3e5 Fix bug #77540 - Invalid Read on exif_process_SOFn 2019-03-03 18:35:26 -08:00
Stanislav Malyshev
5e824a88d0 Fix integer overflows on 32-bits 2019-03-03 18:35:04 -08:00
Nikita Popov
879cd04913 Merge branch 'PHP-7.4' 2019-02-18 17:51:41 +01:00
Tyson Andre
9249d82019 Fix typos in code comments [skip ci] 2019-02-18 17:48:12 +01:00
Johannes Schlüter
d373d13d4a Merge branch 'PHP-7.4' 2019-02-12 15:02:18 +01:00
Nikita Popov
478ff4027c Merge branch 'PHP-7.3' into PHP-7.4 2019-02-12 09:29:19 +01:00
Nikita Popov
c553d17f11 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-12 09:29:05 +01:00
Ben Ramsey
c4294440ff 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.
2019-02-12 09:28:33 +01:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Nikita Popov
c88e2cce81 Removed read_exif_data() alias 2019-01-30 13:13:47 +01:00
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