Commit graph

49866 commits

Author SHA1 Message Date
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
0c35032012 Fix test 2019-01-06 12:30:44 -08:00
Christoph M. Becker
e617f03066 Fix #77367: Negative size parameter in mb_split
When adding the last element to the result value of `mb_split`, the
`chunk_pos` may point beyond the end of the string, in which case the
unsigned `n` would underflow.  Therefore, we check whether this is the
case in the first place, and only calculate `n` otherwise.  Since `n`
is no longer used outside the block, we move its declaration inside.
2019-01-06 12:24:15 -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
8d3dfabef4 Fix #77369 - memcpy with negative length via crafted DNS response 2019-01-06 11:39:09 -08:00
Stanislav Malyshev
31f59e1f30 Fix more issues with encodilng length
Should fix bug #77381, bug #77382, bug #77385, bug #77394.
2019-01-06 11:38:46 -08:00
Christoph M. Becker
567c9f5842 Fix #77270: imagecolormatch Out Of Bounds Write on Heap
At least some of the image reading functions may return images which
use color indexes greater than or equal to im->colorsTotal.  We cater
to this by always using a buffer size which is sufficient for
`gdMaxColors` in `gdImageColorMatch()`.
2019-01-06 11:38:46 -08:00
Stanislav Malyshev
4feb9e66ff Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) 2019-01-06 11:38:46 -08:00
Stanislav Malyshev
c6e34d91b8 Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) 2019-01-06 11:38:46 -08:00
Stanislav Malyshev
deb06bbb9c Fix bug #77370 - check that we do not read past buffer end when parsing multibytes 2019-01-06 11:38:46 -08:00
Christoph M. Becker
dfd8237aec Fix #77269: Potential unsigned underflow in gdImageScale
Belatedly, we're porting the respective upstream patch[1].

[1] <60bfb401ad>
2019-01-06 11:38:46 -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
Stanislav Malyshev
9c62b95e5e Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) 2019-01-06 11:38:46 -08:00
Alexander Kurilo
e3e3289bd1 Regenerate certs for openssl tests 2019-01-06 11:38:46 -08:00
Stanislav Malyshev
c95daa9c75 Fix more issues with encodilng length
Should fix bug #77381, bug #77382, bug #77385, bug #77394.
2019-01-06 11:34:27 -08:00
Christoph M. Becker
7a12dad4dd Fix #77270: imagecolormatch Out Of Bounds Write on Heap
At least some of the image reading functions may return images which
use color indexes greater than or equal to im->colorsTotal.  We cater
to this by always using a buffer size which is sufficient for
`gdMaxColors` in `gdImageColorMatch()`.
2019-01-06 11:34:20 -08:00
Stanislav Malyshev
1cc2182bcc Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) 2019-01-06 11:34:00 -08:00
Stanislav Malyshev
28362ed4fa Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) 2019-01-06 11:33:54 -08:00
Stanislav Malyshev
20407d06ca Fix bug #77370 - check that we do not read past buffer end when parsing multibytes 2019-01-06 11:33:44 -08:00
Christoph M. Becker
a918020c03 Fix #77269: Potential unsigned underflow in gdImageScale
Belatedly, we're porting the respective upstream patch[1].

[1] <60bfb401ad>
2019-01-06 11:33:38 -08:00
Stanislav Malyshev
428d8164ff Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) 2019-01-06 11:33:32 -08:00
Stanislav Malyshev
4fc0bceb7c Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) 2019-01-06 11:33:25 -08:00
jvoisin
3d9624e126 Fix a warning about comparing signed/unsigned variables
This can be seen here: 473895085 (L685)
2019-01-06 01:54:48 +01:00
Andreas Treichel
3c9af3095c Preserve aspect ratio for width or height 2019-01-05 13:39:49 +01:00
Andrey Hristov
f1ede80781 const-ify some functions 2019-01-04 13:55:34 +02:00
Nikita Popov
1be8b3cbd8 Merge branch 'PHP-7.3' 2019-01-04 12:41:30 +01:00
Nikita Popov
361d3ede93 Fix bug #77410 2019-01-04 12:40:28 +01:00
Andrey Hristov
4c4216bcab Add type safety for mysqlnd plugin developers 2019-01-04 13:12:04 +02:00
Andrey Hristov
71ffae9605 Revert visibility 2019-01-04 12:24:10 +02:00
Nikita Popov
043a11cf01 Merge branch 'PHP-7.3' 2019-01-03 09:40:49 +01:00
Nikita Popov
349dbb7938 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-03 09:40:42 +01:00
Nikita Popov
cb009b12a5 Fixed bug #77273 2019-01-03 09:40:07 +01:00
Alexander Kurilo
f51062523d Regenerate certs for openssl tests 2019-01-02 10:00:36 -08:00
Nikita Popov
31375c5ca3 Merge branch 'PHP-7.3' 2019-01-02 14:14:07 +01:00
Nikita Popov
325a113974 Possible fix for bug #77287
The cache size could be off by 4, if we're on a 32-bit system and
the slot had to be bumped for alignment reasons.

I wasn't able to reproduce the issue reported in bug #77287, but I
think this might be the cause.
2019-01-02 14:12:58 +01:00
Andrey Hristov
d64b74869c Test commit 2019-01-02 12:30:12 +02:00
Nikita Popov
25d56a594d Merge branch 'PHP-7.3' 2019-01-02 11:21:30 +01:00
Vincent JARDIN
91e44a27f6 skeleton: support PHP 7.2
skeleton can still be leveraged with older PHP releases, including
PHP 7.2.

I wanted to add this capability since PHP 7.2 is still widely provided
with most Linux distributions.

I am using ext_skel.php on a vanilla Ubuntu 18.04 and Windows
in order to illustrate how to develop a PHP extension for both
OS using the default tools provided by the distributions.
  see: https://github.com/vjardin/php-bonjour
2019-01-02 11:21:25 +01:00
Nikita Popov
2fab3302ae Use ZEND_PARSE_PARAMETERS_NONE in pcre
Instead of the manual ZEND_PARSE_PARAMETERS_START(0, 0) form.
2019-01-02 11:18:35 +01:00
Anatol Belski
5c3bac9c21 Merge branch 'PHP-7.3'
* PHP-7.3:
  Update NEWS
  Fixed bug #75684 In mysqlnd_ext_plugin.h the plugin methods family has no external visibility
2019-01-02 11:03:16 +01:00
Anatol Belski
d1c616f077 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #75684 In mysqlnd_ext_plugin.h the plugin methods family has no external visibility
2019-01-02 11:01:34 +01:00
Anatol Belski
7b3f8e746a Fixed bug #75684 In mysqlnd_ext_plugin.h the plugin methods family has no external visibility 2019-01-02 11:00:33 +01:00
Nikita Popov
7ac3c2fa65 Fix ZEND_NORMALIZE_BOOL usage
Typo introduced in cdd8368d6f.
2019-01-02 09:56:40 +01:00
Nikita Popov
685307b081 Merge branch 'PHP-7.3' 2019-01-02 09:32:59 +01:00
Nikita Popov
91888cc372 Fixed bug #77257
Correctly handle the case of duplicate predecessors, by removing the
duplicate predecessor and corresponding phi node operands.

For the future, it would be better to instead allow duplicate
predecessors and avoid this kind of fragile code...
2019-01-02 09:31:50 +01:00
Xinchen Hui
c5c76fbd61 Merge branch 'PHP-7.3'
* PHP-7.3:
  Update NEWS
  Fixed bug #77395 (segfault about array_multisort)
2019-01-02 12:10:41 +08:00
Xinchen Hui
e527626d9f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77395 (segfault about array_multisort)
2019-01-02 12:10:04 +08:00
Xinchen Hui
8ebae84674 Fixed bug #77395 (segfault about array_multisort) 2019-01-02 12:09:47 +08:00
Christoph M. Becker
c670b622ab Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #77391: 1bpp BMPs may fail to be loaded
2018-12-31 20:52:27 +01:00