Commit Graph

1352 Commits

Author SHA1 Message Date
Peter Kokot
b1643e166d Fix failed tests for phar
- when $status is boolean, E_NOTICE appears and tests fail
- opcache is never enabled on these tests anyway.
- Add opcache.revalidate_freq=0 to testing script

  Instead of checking this in the tests files it can be used directly in
  the main testing script. Also this fixes failed tests.

- Use opcache_invalidate() instead of sleep() delay in some tests. Some
  delays are still used since the opcache_invalidate seems to be buggy
  and not working as expected.

Closes GH-4392
2019-07-21 00:49:35 +02:00
Peter Kokot
265bd7d039 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove safe_mode directive when installing ext/phar
2019-07-19 00:03:06 +02:00
Peter Kokot
7cbc6b6546 Remove safe_mode directive when installing ext/phar
Closes GH-4436
2019-07-19 00:02:12 +02:00
Nikita Popov
3c2f433b2b Merge branch 'PHP-7.4' 2019-07-17 12:02:30 +02:00
Nikita Popov
856c5d2837 Revert "Avoid unused fstat() call"
This reverts commit 5a90dc77b8.

Let's try to go with the reverse direction here and actually trust
the reported size...
2019-07-17 11:49:10 +02:00
Nikita Popov
995b391621 Merge branch 'PHP-7.4' 2019-07-17 11:22:41 +02:00
Nikita Popov
5a90dc77b8 Avoid unused fstat() call
If we're including a file via PHP streams, we're not going to trust
the reported file size anyway and populate in a loop -- so don't
bother determining the file size in the first place. Only do this
for non-tty HANDLE_FP now, which is the only case where this
information was used.
2019-07-17 11:22:31 +02:00
Nikita Popov
c4a6998c62 Merge branch 'PHP-7.4' 2019-07-16 17:45:03 +02:00
Nikita Popov
b317f0eb59 Remove ZEND_HANDLE_MAPPED
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
2019-07-16 17:44:32 +02:00
Nikita Popov
e0eca26285 Drop free_filename field from zend_file_handle
free_filename was always zero.
2019-07-16 17:07:26 +02:00
Nikita Popov
3faa903d47 Merge branch 'PHP-7.4' 2019-07-16 16:44:46 +02:00
Nikita Popov
49bac9b77b Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Nikita Popov
06cf349dc3 Merge branch 'PHP-7.4' 2019-07-16 15:48:24 +02:00
Nikita Popov
e08cc4d921 Remove ZEND_HANDLE_FD
This handle type was unused.
2019-07-16 15:47:10 +02:00
Nikita Popov
e36118a5c5 Merge branch 'PHP-7.4' 2019-07-16 12:20:21 +02:00
Nikita Popov
290e520c03 Use ZEND_HASH_FOREACH APIs in a few more places 2019-07-16 12:20:16 +02:00
Nikita Popov
98495f7f30 Merge branch 'PHP-7.4' 2019-07-12 13:14:38 +02:00
Nikita Popov
709897c2a5 Remove unused tsrm_strtok_r() function
There is also a php_strtok_r() function, which is actually used,
but nothing uses the tsrm_strtok_r() variant...
2019-07-12 13:14:24 +02:00
Nikita Popov
1cdc0d9056 Merge branch 'PHP-7.4' 2019-07-10 12:55:52 +02:00
Nikita Popov
07bbc54658 Fix file collisions in phar tests 2019-07-10 12:55:40 +02:00
Peter Kokot
8569a6740e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix phar tests with hash extension
  Fix missing file and remove SKIP section
2019-06-30 23:52:30 +02:00
Peter Kokot
839ff378bc Fix phar tests with hash extension
- The hash extension is now always available.

- Remove unfinished test
  The Phar::PGP currently doesn't exist yet.
2019-06-30 23:51:56 +02:00
Peter Kokot
221494f4de Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols
2019-06-27 23:29:11 +02:00
Peter Kokot
033cafacbd Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols
The hash extension is always available since PHP-7.4. The symbol
HAVE_HASH_EXT is kept for BC reasons and removed in PHP-8.0.

This patch also removes the PHAR_HASH_OK since it is no longer
relevant.
2019-06-27 23:25:33 +02:00
Nikita Popov
a1479fbbd9 Merge branch 'PHP-7.4' 2019-06-25 14:30:24 +02:00
Nikita Popov
c7962207d7 Fix stream leak in phar cache_list 2019-06-25 14:28:58 +02:00
Nikita Popov
d2a1fe8462 Merge branch 'PHP-7.4' 2019-06-25 10:26:20 +02:00
Nikita Popov
43dd1ac570 Avoid confusing gotos in phar_split_cache_list 2019-06-25 10:25:44 +02:00
Nikita Popov
31123de0c8 Fix EVP_PKEY leak in phar 2019-06-25 10:25:44 +02:00
Nikita Popov
bba88eb6a1 Merge branch 'PHP-7.4' 2019-06-19 15:36:31 +02:00
Nikita Popov
c10cb47b5f Fix uninitialized variable
I mistakenly moved len1 initialization into the conditional as well.
2019-06-19 15:34:51 +02:00
Nikita Popov
3645292235 Merge branch 'PHP-7.4' 2019-06-19 15:09:39 +02:00
Nikita Popov
b1196e2128 Phar: Avoid negative zip dates
The zip date/time encoding format is incredibly stupid.
2019-06-19 15:09:00 +02:00
Nikita Popov
7bf6326259 Fix memcpy null UB in phar 2019-06-19 15:09:00 +02:00
Joe Watkins
96cfcd407e
Merge branch 'PHP-7.4'
* PHP-7.4:
  this mtime comparison makes assumptions that cannot always hold true
2019-06-16 08:29:41 +02:00
Joe Watkins
2283884475
this mtime comparison makes assumptions that cannot always hold true 2019-06-16 08:29:04 +02:00
Christoph M. Becker
9922000dd1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Prevent test conflicts
2019-05-14 10:12:11 +02:00
Christoph M. Becker
15b394cce9 Prevent test conflicts 2019-05-14 10:11:29 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
4e88112adb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix undefined variable, and remove unused test-pdo
2019-05-03 18:14:53 +02:00
peter279k
ba0913a2e5 Fix undefined variable, and remove unused test-pdo 2019-05-03 18:14:32 +02:00
Christoph M. Becker
0e2ff0dd94 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix VirtualProtect() related Phar issues
2019-04-26 09:09:35 +02:00
Christoph M. Becker
be74a00464 Fix VirtualProtect() related Phar issues
We must not (try to) modify shared values, but rather have to use our
own copies, if unixified filenames are required on Windows.  To avoid
excessive string duplication, we add checks whether the filenames are
already unixified (i.e. do not contain backslashes).  To improve the
performance if we need to copy strings, we use do_alloca() and friends.

Besides generally being somewhat messy, the handling of unixified
filenames is still suboptimal performance-wise, but we leave this for a
future cleanup, and focus on fixing the issue at hand for now.

We also enable opcache.protect_memory for the AppVeyor CI.
2019-04-26 09:09:22 +02:00
Christoph M. Becker
263b0cf71b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests for non English environments
2019-04-17 09:58:40 +02:00
Christoph M. Becker
346ac968b3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix tests for non English environments
2019-04-17 09:58:12 +02:00
Christoph M. Becker
ec8457d982 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix tests for non English environments
2019-04-17 09:57:37 +02:00
Christoph M. Becker
6fe75f9e45 Fix tests for non English environments 2019-04-17 09:56:55 +02:00
Anatol Belski
30f5822a9b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix phar:// include handling with file cache
2019-04-10 14:57:27 +02:00
Anatol Belski
db7aba538d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix phar:// include handling with file cache
2019-04-10 14:57:04 +02:00
Anatol Belski
1aa30bb71c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix phar:// include handling with file cache
2019-04-10 14:56:29 +02:00
Anatol Belski
f31d7ca85e Fix phar:// include handling with file cache 2019-04-10 14:55:15 +02:00
rjhdby
e86cdce549 Make zend_hash_sort() return void
This function always succeeds, so remove the success indicator
return value.
2019-03-22 09:51:47 +01:00
Kalle Sommer Nielsen
e632537c83 Remove usage of HAVE_HASH_EXT and COMPILE_DL_HASH as ext/hash is always available (master only) 2019-03-20 20:43:35 +02:00
Peter Kokot
6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Nikita Popov
585f4cbb21 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-15 17:08:01 +01:00
Xinchen Hui
9f9b2573ed Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #77697 (Crash on Big_Endian platform)
2019-03-15 16:58:42 +08:00
Xinchen Hui
b419590893 Fixed bug #77697 (Crash on Big_Endian platform) 2019-03-15 16:58:08 +08:00
Nikita Popov
852485d8ec Adjust tests for zpp TypeError change 2019-03-11 11:32:20 +01:00
Peter Kokot
d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
19e4abd7ec Merge branch 'PHP-7.4' 2019-03-07 15:55:13 +01:00
Nikita Popov
c8e10c6119 More zpp error/variation test removals 2019-03-07 15:54:31 +01:00
Anatol Belski
4a7a79b37a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test portability
2019-03-04 14:30:55 +01:00
Anatol Belski
53c44a43dd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test portability
2019-03-04 14:30:32 +01:00
Anatol Belski
a976283c34 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test portability
2019-03-04 14:30:01 +01:00
Anatol Belski
040196972c Fix test portability 2019-03-04 14:28:47 +01:00
Stanislav Malyshev
d2a8904146 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
  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 23:34:00 -08:00
Stanislav Malyshev
ad4f312d2f Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename 2019-03-03 23:34:00 -08:00
Stanislav Malyshev
071e18c697 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
2019-03-03 23:33:54 -08:00
Stanislav Malyshev
6d60ed69a1 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
2019-03-03 23:33:48 -08:00
Stanislav Malyshev
3e8d8f7fb3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
2019-03-03 23:33:43 -08:00
Stanislav Malyshev
e0f5d62bd6 Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow 2019-03-03 23:05:32 -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
7f0ab7c20c Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename 2019-03-03 18:22:32 -08:00
Nikita Popov
93ee216966 Merge branch 'PHP-7.4' 2019-02-22 11:26:26 +01:00
Nikita Popov
e2cc0b823c Fix more file name collisions in phar tests 2019-02-22 11:25:52 +01:00
Nikita Popov
3b5e566e62 Merge branch 'PHP-7.4' 2019-02-22 10:53:28 +01:00
Nikita Popov
d3e00decd4 Use separate files in phar tests 2019-02-22 10:50:56 +01:00
Peter Kokot
17baa87fad Merge branch 'PHP-7.4'
* PHP-7.4:
  Update and fix remaining year ranges (2019)
2019-02-08 23:15:49 +01:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Dmitry Stogov
91ef4124e5 Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s). 2019-02-04 13:20:25 +03: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
0dfd918ee7 Remove support for __autoload()
There are probably some improvements we can do to the SPL
implementation now that __autoload() is gone. In particular having
EG(autoload_func) as a property zend function, rather than a simple
callback probably doesn't make sense.
2019-01-30 14:00:16 +01:00
jvoisin
fbdaabba62 Fix some sign-related issues in comparisons 2019-01-09 10:01:12 +01:00
Stanislav Malyshev
0f148839b5 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #77367: Negative size parameter in mb_split
  Fix #77369 - memcpy with negative length via crafted DNS response
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 12:50:10 -08:00
Stanislav Malyshev
e40027ef0f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77369 - memcpy with negative length via crafted DNS response
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 12:23:53 -08:00
Stanislav Malyshev
fe820fcba6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #77369 - memcpy with negative length via crafted DNS response
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 11:57:16 -08:00
Stanislav Malyshev
78bd347774 Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) 2019-01-06 11:38:46 -08:00
Dmitry Stogov
c706adaaab Added missing invalidations. 2018-12-28 00:14:49 +03:00
Dmitry Stogov
675a8a64c3 Use HT_IS_INITIALIZED() and HT_INVALIDATE() macros instead of hackish HT_FLAGS assumtions. 2018-12-27 22:48:25 +03:00
Dmitry Stogov
c2179309f4 Removed useless check 2018-12-27 22:35:37 +03:00
Stanislav Malyshev
c3ca95dad2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:43:00 -08:00
Stanislav Malyshev
3d8d13f7b9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
  Don't need interactive progress on git clones in Travis
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-03 00:42:55 -08:00
Stanislav Malyshev
8fff90250b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:42:50 -08:00
Stanislav Malyshev
8ab5d22332 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:42:45 -08:00
Stanislav Malyshev
5718d73dbb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #77143 - add more checks to buffer reads
2018-12-03 00:42:35 -08:00
Stanislav Malyshev
48f0f73f75 Fix bug #77143 - add more checks to buffer reads 2018-12-03 00:41:46 -08:00
Stanislav Malyshev
66a0f061f6 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:39:03 -08:00
Stanislav Malyshev
54212674b9 Fix bug #77143 - add more checks to buffer reads 2018-12-03 00:03:10 -08:00
Gabriel Caruso
cdd8368d6f Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Stanislav Malyshev
377562fc6f Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-02 15:12:21 -08:00
Stanislav Malyshev
1225467d8a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-02 15:12:15 -08:00
Stanislav Malyshev
f8eac1f438 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-02 13:38:59 -08:00
Stanislav Malyshev
6e3f5d57d4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-02 13:18:07 -08:00
Stanislav Malyshev
aabdb71dc3 Fix TSRM signature - php_stream_stat macro has it's own TSRM 2018-12-02 12:54:19 -08:00
Stanislav Malyshev
2fba1e2f59 Improve test for bug77022 2018-12-02 12:06:13 -08:00
Stanislav Malyshev
494d5d2429 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:49:53 -08:00
Stanislav Malyshev
b1446521d7 Fix bug #77022 - use file mode or umask for new files 2018-12-01 21:48:49 -08:00
Stanislav Malyshev
e614b12712 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
2018-12-01 21:48:44 -08:00
Stanislav Malyshev
c5869fd1c8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
2018-12-01 21:48:40 -08:00
Stanislav Malyshev
09885f78c6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
2018-12-01 21:48:35 -08:00
Stanislav Malyshev
cea277048d Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:48:27 -08:00
Stanislav Malyshev
cc84d893c7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:47:49 -08:00
Stanislav Malyshev
8136d130b6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:47:44 -08:00
Stanislav Malyshev
1aec05defd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:47:37 -08:00
Stanislav Malyshev
67f3615102 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #77022 - use file mode or umask for new files
2018-12-01 21:08:38 -08:00
Stanislav Malyshev
69f5e7992b Fix bug #77022 - use file mode or umask for new files 2018-12-01 21:06:45 -08:00
Nikita Popov
2fac9d9ec1 Remove some mentions of RECOVERABLE_ERROR in tests
Mostly drop error handlers that are no longer necessary.
2018-11-15 22:13:46 +01:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +03:00
Peter Kokot
f0251a8b16 Remove lexer files generated by RE2C
This patch removes generated lexer files by re2c during the build
process so they are not tracked by Git yet can be still shipped when
PHP is released. The genfiles script additionally provides generation
of these lexer files when creating a release of the PHP source code.

The genfiles script refactorings:
- added file header
- echoing steps instead of comments
- cleaning only lines starting with `#line`
- eval removed in favor of direct executed commands
- the debug mode `set -x` removed
- script can be called from any path
- improved comments
2018-11-11 02:55:46 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Peter Kokot
d6c05c6cd1 Rename two *.php files in tests folders
Current run-tests.php script produces the `*.php` files from the
*.phpt. So all *.php files in tests folders are ignored by Git.

To avoid confusion and to for bettere consistency this patch renames
two remaining tests/*/*.php files to *.inc and *.phar as current
practice in *.phpt files.

- The `ext/curl/tests/resonder/get.php` to .inc extension
- The `ext/phar/tests/files/pear2coverage.phar.php` to .phar extension
2018-10-20 10:11:29 +02:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
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
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
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
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
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
2018-10-15 04:31:31 +02:00
Peter Kokot
113213f027 Sync leading and final newlines in *.phpt sections
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
2018-10-15 04:29:24 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
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
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
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
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
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
2018-10-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
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
2018-10-14 12:51:01 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Peter Kokot
c951836721 Remove unused files
- ext/simplexml/tests/bug25756_1.xml
- ext/simplexml/tests/bug25756_2.xml
- ext/simplexml/tests/bug25756.xsd
Added via 503d74aa29 and then removed via
9e29f17493

- ext/mysqli/tests/cacert.pem
- ext/mysqli/tests/client-cert.pem
- ext/mysqli/tests/client-key.pem
Added via e9f9f66f2e and then removed via
6d51b7b2e3

- ext/gd/tests/simpletext私はガラスを食べられます.jpg
Added via 3d3f11ede4 and never used

- ext/gd/tests/src.png
Added via cc938b5df0 and never used

- ext/zlib/tests/gzgetss.test
Added via d536ecac5c as a file content of the
ext/zlib/tests/gzgetss.gzbut but never used in tests directly. Removed for
better clarity of zlib tests

- ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2_absolute.wsdl
- ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.wsdl
- ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.wsdl
Added via 1d25fc5c7b and never used

- ext/reflection/tests/exception.inc
Removed via 9f8ba2e8a1

- ext/phar/tests/files/extracted.inc
Removed via 549bf83bd1

- ext/phar/tests/cache_list/files/extracted.inc
Added via 05c3104097 and never used
2018-09-26 12:54:20 +02:00
Peter Kokot
bfa2c7158f Fix permissions
Certain files don't need to be executables.
2018-09-21 14:12:25 +02:00
Gabriel Caruso
f72b6c5e19
Use EXPECT instead of EXPECTF when possible 2018-09-16 15:39:18 -03:00
Tyson Andre
26f952b175 Fix a typo in a class catch in Phar 2018-09-13 11:48:42 +02:00
Nikita Popov
4cbabb6852 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-04 05:32:52 +02:00
Nikita Popov
08addfea86 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-04 05:32:42 +02:00
Nikita Popov
f1f39d7ed7 Fix parenthesis warning 2018-09-04 05:32:25 +02:00
Anatol Belski
1ccc4ff260 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix stack underflow in phar
2018-08-30 19:34:01 +02:00
Anatol Belski
7fb7869e13 Fix stack underflow in phar
The checks can issue reads below and above the temporary buffer. A read
itself doesn't seem dangerous, but the condition result can be
arbitrary. Such reads have to be avoided. Likely this patch should be
backported.

(cherry picked from commit b053beee7e)
2018-08-30 19:33:07 +02:00
Peter Kokot
3ceecaa9a0 Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS
Since Autoconf 2.50+ macro AC_STRUCT_ST_BLOCKS defines the new
HAVE_STRUCT_STAT_ST_BLOCKS symbol and has deprecated the previous
HAVE_ST_BLOCKS.

PHP 5.3 required Autoconf 2.13 (released in 1999) or newer, since PHP
5.4 the autoconf 2.59 (released in 2003) or newer was required, and
since PHP 7.2, autoconf 2.64 (released in 2008) or newer is required.
2018-08-24 18:33:23 +02:00
Anatol Belski
2dfb74682f Merge branch 'PHP-7.3'
* PHP-7.3:
  Sync with e0fe6674
2018-08-13 09:22:07 +02:00
Anatol Belski
fdaa540fd8 Sync with e0fe6674 2018-08-13 09:18:38 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Peter Kokot
f689223b4e Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #76030 RE2C_FLAGS rarely honoured
2018-08-12 11:16:06 +02:00
Cristian Rodríguez
e0fe667421 Fix bug #76030 RE2C_FLAGS rarely honoured
Since PHP 5.3 the default lexer generator is RE2C. On Unix-alike build
systems there is also optional configure option --enable-re2c-cgoto
which enables optimized conditional jumps using non-standard computed
goto extension. It is available since RE2C 0.10.3 so it's well covered
by RE2C versions PHP uses. This patch syncs usage of -g option accross
the PHP Unix-alike build system.
2018-08-12 11:15:18 +02:00
Levi Morrison
29b56a878a Quell GCC warning on mixing || and && 2018-08-11 16:54:21 -06:00
Gabriel Caruso
f47cdd1ee0
Remove invalid SKIPIF sections and make more tests run 2018-08-07 21:23:21 -03:00
Anatol Belski
8d9541b6c8 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix stack underflow in phar
2018-08-06 22:44:32 +02:00
Anatol Belski
b053beee7e Fix stack underflow in phar
The checks can issue reads below and above the temporary buffer. A read
itself doesn't seem dangerous, but the condition result can be
arbitrary. Such reads have to be avoided. Likely this patch should be
backported.
2018-08-06 22:43:45 +02:00
Gabriel Caruso
0e0019f694
Remove superfluous checks of always available functions 2018-08-03 00:13:01 -03:00
Peter Kokot
d2184efb7b Replace obsolete AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV
Autoconf 2.50 released in 2001 has made several macros obsolete. Instead
of the AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV the new
AC_CHECK_MEMBERS should be used.

When checking for the presence of stat struct members st_blkzize and
st_rdev the new AC_CHECK_MEMBERS macro defines new constants
HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV.

Old constants HAVE_ST_BLKSIZE and HAVE_ST_RDEV need to be replaced
respectively in PHP code (this patch) and in PHP extenstions if they use
them.

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version.
2018-07-29 13:59:40 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Gabriel Caruso
49c193eeb3
Make more tests run and fix SKIPIF sections 2018-07-16 00:01:46 -03:00
Dmitry Stogov
67b4c3379a Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY() 2018-07-09 12:46:46 +03:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
43d5a3665d It's safer to use zval_ptr_dtor() for iterator keys. 2018-07-05 16:56:52 +03:00
Dmitry Stogov
3780b027dd Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 14:25:17 +03:00
Dmitry Stogov
b6fb584505 Replace zval_dtor() with specialized destructors 2018-07-05 13:32:39 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Peter Kokot
7c04219098 Fix pecl vs ext typo in phar
Phar phpinfo output lists also info about bz2 extension if it's
disabled and a quick info about installation. Instead of not maintained
pecl package bz2 the ext/bz2 should be mentioned. Also some outdated
pecl/phar are updated to ext/phar instead in test comments.
2018-06-30 15:35:43 +02:00
Peter Kokot
3f96f01e9e Bump phar and hash extension version to match PHP version 2018-06-21 13:15:32 +02:00
David Carlier
80bb649ad1 phar module, unsignedness check changes.
while at it, correcting seemingly subtle bug when checking
extension validity.
2018-06-18 14:08:50 +00:00
Peter Kokot
7bf091c5c2 Remove SVN revision from phar phpinfo output
The SVN revision was utilized with Subversion. The Git ident
attribute applies only for particular file and since other core
extensions don't output this information anymore this patch
removes it from the phpinfo output to sync and make the phpinfo
core extensions more consistent.
2018-06-16 12:47:33 +02:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03: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
Stanislav Malyshev
6e64aba47f Fix #76129 - remove more potential unfiltered outputs for phar 2018-04-23 13:43:43 -07:00
Stanislav Malyshev
03108697b8 Merge branch 'PHP-7.2'
* PHP-7.2:
  Add a bit of defensive conding for bug #76155
2018-04-22 20:28:44 -07:00
Stanislav Malyshev
83e7618f05 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add a bit of defensive conding for bug #76155
2018-04-22 20:28:35 -07:00
Stanislav Malyshev
ff83c00715 Add a bit of defensive conding for bug #76155
Even though it should not be ever negative, since strlen() is size_t
better to be safe than sorry.
2018-04-22 20:27:42 -07:00
Anatol Belski
2e5ac355b9 Move to unsigned types in phar
Preventing integer overflows in principle, which allows to avoid additional
range checks. The phar format is based on 32-bit lengths, so the storage
sizes was kept same.
2018-04-18 20:15:05 +02:00
solotandem
94b4abdbc4
Be consistent in is_executable on a directory in any stream wrapper.
Current code treats the 'local files' stream wrapper ('php_plain_files_wrapper')
  different than all other stream wrappers. For the 'local' stream wrapper,
  is_executable only checks the mode key in the filestat array on the file or
  directory in question. For other stream wrappers, is_executable always returns
  FALSE on a directory. This treatment is inconsistent on its face.

  Also, for a custom stream wrapper that also points to local files, the result
  of is_executable is always FALSE even though it may be TRUE if the function were
  called on the same item using the 'local' stream wrapper from PHP.

  NOTE: patch does not attempt to add a test for this as there are no tests of
  is_executable for stream wrappers.
2018-03-27 21:49:26 +02:00
Niklas Keller
e459d27315 Drop double CHECK_NULL_PATH check for PHARs 2018-03-23 19:04:47 +01:00
Xinchen Hui
f4da273c76 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n)
2018-03-13 12:56:27 +08:00
Xinchen Hui
e547c9f139 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n)
2018-03-13 12:52:07 +08:00
Xinchen Hui
4ee9098514 Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n) 2018-03-13 12:51:26 +08:00
Gabriel Caruso
701437a948
Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Gabriel Caruso
b895690dfa
remove support for string|unicode in tests 2018-02-22 08:11:30 +01:00
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
21e3b0c70c Remove trailing whitespace in inc files 2018-02-10 19:20:23 +01:00