summaryrefslogtreecommitdiff
path: root/ext/exif
Commit message (Collapse)AuthorAgeFilesLines
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1513-14/+7
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in *.phptPeter Kokot2018-10-1412-17/+17
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in source code filesPeter Kokot2018-10-131-2/+2
|
* Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2018-07-165-2/+106
|\ | | | | | | | | | | | | | | | | * 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
| * Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2018-07-165-2/+106
| |\ | | | | | | | | | | | | | | | | | | | | | * 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
| | * Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif dataStanislav Malyshev2018-07-163-1/+83
| | | | | | | | | | | | Use MAKERNOTE length as data size.
| | * Fix bug #76423 - Int Overflow lead to Heap OverFlow in ↵Stanislav Malyshev2018-07-163-1/+23
| | | | | | | | | | | | exif_thumbnail_extract of exif.c
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2018-04-234-1/+21
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2018-04-234-1/+21
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | * Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_valueChristoph M. Becker2018-04-224-1/+21
| | | | | | | | | | | | | | | | | | 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.
* | | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-10-111-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Use PHP_VERSION for exif
| * | Use PHP_VERSION for exifPeter Kokot2017-10-041-1/+1
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-08-011-0/+14
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Test to cover the change in ce1a0d97
| * | Test to cover the change in ce1a0d97Anatol Belski2017-08-011-0/+14
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-01-151-6/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix test
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2017-01-151-6/+6
| |\ \ | | |/ | | | | | | | | | * PHP-5.6: Fix test
| | * Fix testStanislav Malyshev2017-01-151-6/+6
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-01-151-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Update more functions with path check
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2017-01-151-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-5.6: Update more functions with path check
| | * Update more functions with path checkStanislav Malyshev2017-01-151-1/+1
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-01-051-1/+1
|\ \ \ | |/ /
| * | Merge branch 'PHP-5.6' into PHP-7.0Nikita Popov2017-01-051-1/+1
| |\ \ | | |/
| | * Fix printf modifierNikita Popov2017-01-051-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-042-2/+2
| | |
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-042-2/+2
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-01-023-1/+13
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * 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)
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2017-01-023-1/+13
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | * 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)
| | * Fix bug #73737 FPE when parsing a tag formatStanislav Malyshev2016-12-313-1/+13
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2016-09-041-1/+4
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Same issue as #72926 in another place.
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2016-09-041-1/+4
| |\ \ | | |/ | | | | | | | | | * PHP-5.6: Same issue as #72926 in another place.
| | * Same issue as #72926 in another place.Stanislav Malyshev2016-09-041-1/+4
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2016-08-173-1/+75
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2016-08-171-1/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: (24 commits) 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 Fix bug#72697 - select_colors write out-of-bounds Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF Fix bug #72750: wddx_deserialize null dereference Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack Improve fix for #72663 Fix bug #70436: Use After Free Vulnerability in unserialize() Fix bug #72749: wddx_deserialize allows illegal memory access ... Conflicts: Zend/zend_API.h ext/bz2/bz2.c ext/curl/interface.c ext/ereg/ereg.c ext/exif/exif.c ext/gd/gd.c ext/gd/tests/imagetruecolortopalette_error3.phpt ext/gd/tests/imagetruecolortopalette_error4.phpt ext/session/session.c ext/snmp/snmp.c ext/standard/base64.c ext/standard/ftp_fopen_wrapper.c ext/standard/quot_print.c ext/standard/url.c ext/standard/uuencode.c ext/standard/var.c ext/standard/var_unserializer.c ext/standard/var_unserializer.re ext/wddx/tests/bug72790.phpt ext/wddx/tests/bug72799.phpt ext/wddx/wddx.c sapi/cli/generate_mime_type_map.php
| | * Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFFStanislav Malyshev2016-08-163-1/+75
| | |
| * | Merge branch 'PHP-7.0' into PHP-7.0.10Stanislav Malyshev2016-08-161-2/+12
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: (34 commits) Fix URL rewriter partially Support "git worktree" Add NEWS Fix ASSERT logic Bugfix 72791: fix memory leak in PDO persistent connections Don't copy mime types in CLI server Remove obsolete Id tags Bump version in OCI8 test Fixed bug #72788 (Invalid memory access when using persistent PDO connection) Remove typo'd commit Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections. Replace dead branch with ZEND_ASSERT() Add test for bug #69107: finfo no longer detects PHP files Fix bug #55451 Fix stream_socket_enable_crypto() test Remove old $Id$ tags Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical Fix bug #72524 (Binding null values triggers ORA-24816 error) Fix the fix (Nikita), thanks! Check the return value of dbconvert() in mssql_guid_string(), as it may return -1 in case the conversion failed. In that case false is returned. ... Conflicts: ext/standard/ftp_fopen_wrapper.c
| * | | Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFFStanislav Malyshev2016-08-163-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 620b01337cc39f856ca68c34c35e154f5f0682fc) Conflicts: ext/exif/exif.c
* | | | improve the check, avoid strlen on NULLAnatol Belski2016-08-031-4/+0
| | | |
* | | | Changed the way MAKERNOTE is handled in case we do not have a matching ↵Kalle Sommer Nielsen2016-08-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | signature (Remi). Before this patch, exif_process_IFD_in_MAKERNOTE() would return false, then causing the rest of the EXIF parsing to be interrupted. This is a regression from earlier which was most likely a part of a security fix for MAKERNOTE. The new behavior is to instead of stopping to parse, to continue so we can still fetch data like thumbnail and GPS, thrus allowing yet unsupported formats to parse. If EXIF's debugging mode is enabled, a notice will display in case we do not match against a valid MAKERNOTE signature. This should temporarily fix bug #72682 (exif_read_data() fails to read all data for some images) until I get around to debug it further.
* | | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-08-031-4/+4
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * PHP-7.0: improve the check, avoid strlen on NULL
| * | | Merge branch 'PHP-5.6' into PHP-7.0Anatol Belski2016-08-031-4/+4
| |\ \ \ | | | |/ | | |/| | | | | | | | | * PHP-5.6: improve the check, avoid strlen on NULL
| | * | improve the check, avoid strlen on NULLAnatol Belski2016-08-031-4/+4
| | | |
* | | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-08-031-2/+12
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * PHP-7.0: update NEWS update NEWS Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
| * | | Merge branch 'PHP-5.6' into PHP-7.0Anatol Belski2016-08-031-2/+12
| |\ \ \ | | |/ / | | | / | | |/ | |/| | | | * PHP-5.6: update NEWS Changed the way MAKERNOTE is handled in case we do not have a matching signature (Remi).
| | * Changed the way MAKERNOTE is handled in case we do not have a matching ↵Kalle Sommer Nielsen2016-08-031-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | signature (Remi). Before this patch, exif_process_IFD_in_MAKERNOTE() would return false, then causing the rest of the EXIF parsing to be interrupted. This is a regression from earlier which was most likely a part of a security fix for MAKERNOTE. The new behavior is to instead of stopping to parse, to continue so we can still fetch data like thumbnail and GPS, thrus allowing yet unsupported formats to parse. If EXIF's debugging mode is enabled, a notice will display in case we do not match against a valid MAKERNOTE signature. This should temporarily fix bug #72682 (exif_read_data() fails to read all data for some images) until I get around to debug it further. (cherry picked from commit aabcb5481d9e717df77192dab2894468b9fc63b4)
* | | Merge branch 'PHP-7.0'Anatol Belski2016-07-193-5/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: fix test portability and expectation
| * | Merge branch 'PHP-5.6' into PHP-7.0Anatol Belski2016-07-193-5/+5
| |\ \ | | |/ | | | | | | | | | * PHP-5.6: fix test portability and expectation
| | * fix test portability and expectationAnatol Belski2016-07-193-5/+5
| | | | | | | | | | | | | | | | | | The test images for #72603 and #72618 are broken, that seems to be the cause of different test output. Seems also to be platform dependent, so it's not reliable to depend on the exact error output.
* | | Merge branch 'PHP-7.0'Stanislav Malyshev2016-07-197-17/+58
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: (27 commits) fix #72519, possible OOB using imagegif fix #72512, invalid read or write for palette image when invalid transparent index is used Apparently some envs miss SIZE_MAX Fix tests Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment Partial fix for bug #72613 - do not allow reading past error read Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c Fix for bug #72558, Integer overflow error within _gdContributionsAlloc() Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE update NEWS Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders Fix bug #72562 - destroy var_hash properly Fix bug #72551 and bug #72552 - check before converting size_t->int Fix bug #72541 - size_t overflow lead to heap corruption Fix bug #72533 (locale_accept_from_http out-of-bounds access) Fix fir bug #72520 Fix for bug #72513 Fix for bug #72513 CS fix and comments with bug ID ... Conflicts: ext/standard/basic_functions.c