Commit Graph

599 Commits

Author SHA1 Message Date
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Anatol Belski
4121f2a1ad Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75774 imap_append HeapCorruction
2018-01-12 17:14:46 +01:00
Anatol Belski
1d05750c50 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75774 imap_append HeapCorruction
2018-01-12 17:14:19 +01:00
Anatol Belski
cecf734dc3 Fixed bug #75774 imap_append HeapCorruction 2018-01-12 17:13:18 +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
Nikita Popov
9fb75c59b4 Merge branch 'PHP-7.2' 2017-12-09 19:07:47 +01:00
Nikita Popov
c069db52ae Merge branch 'PHP-7.1' into PHP-7.2 2017-12-09 19:07:40 +01:00
Michael Heimpold
1b10e6318b ext/imap/config.m4: fix ac_cv_u8t_decompose check
Once upon the time, commit c58f63a38a
changed the check from U8T_CANONICAL to U8T_DECOMPOSE. However,
the autoconf cache id was not renamed.

Sometimes it is desirable to preseed the autoconf variables, e.g. when
cross-compiling to avoid the tests running on the host system. In this
case it's confusing when the cache id does not match the variable to
set, so let's adjust it.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2017-12-09 19:05:45 +01:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Peter Kokot
e101a2e509 Remove tutorial for building IMAP on windows
Procedure for building PHP on Windows systems has changed during the PHP
evolution and is for the time being available on wiki pages outside of
this code repository.
2017-12-05 14:06:27 +01:00
Kalle Sommer Nielsen
5a991ea49b Fixed bug #72324 (imap_mailboxmsginfo() return wrong size) 2017-07-07 08:18:33 +02:00
Kalle Sommer Nielsen
9507d14584 Fix redefine warnings 2017-07-07 08:08:25 +02:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Pedro Magalhães
9c5af4e4cb Remove the b prefix from literals on unrelated tests 2016-11-20 21:11:53 +01:00
Anatol Belski
9b81342352 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  Fix bug #73144 and bug #73341 - remove extra dtor
  remove unreferenced var came in with merge
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  fix version
  set versions
  Fix bug #73144 and bug #73341 - remove extra dtor
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
2016-11-08 11:15:06 +01:00
Anatol Belski
2b30b54275 Merge remote-tracking branch 'phpsec/PHP-7.0.13' into PHP-7.0
* phpsec/PHP-7.0.13:
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  Fix bug #73144 and bug #73341 - remove extra dtor
  remove unreferenced var came in with merge
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
  fix version
  set versions
2016-11-08 11:13:29 +01:00
Stanislav Malyshev
25d04ad8e3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add length check for bzcompress too - fix for bug #73356
  More string length checks & fixes
  More string length checks & fixes
2016-11-03 22:53:05 -07:00
Stanislav Malyshev
6e12e49b5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  More string length checks & fixes
2016-11-03 20:46:25 -07:00
Stanislav Malyshev
ea9fac94bb More string length checks & fixes 2016-11-03 20:36:52 -07:00
Anatol Belski
de643586de Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
(cherry picked from commit 99b242a6d0)
2016-11-03 17:09:03 +01:00
Stanislav Malyshev
ef801b9bf9 Fix bug #73208 - another missing length check 2016-10-03 00:12:14 -07:00
Anatol Belski
2088e3eb45 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  pick up the safe alloc pieces from 19866fb76c
2016-09-13 11:51:17 +02:00
Anatol Belski
c403b30291 pick up the safe alloc pieces from
19866fb76c
2016-09-13 11:50:18 +02:00
Stanislav Malyshev
19866fb76c Fix various int size overflows.
Add function for detection of string zvals with length that does not fit
INT_MAX.
2016-09-12 21:04:23 -07:00
Anatol Belski
f613582898 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
  update NEWS
  Fixed bug #72852 imap_mail null dereference
2016-08-20 01:38:30 +02:00
Anatol Belski
a569b8816b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  update NEWS
  Fixed bug #72852 imap_mail null dereference
2016-08-20 01:37:26 +02:00
Anatol Belski
21f08a7488 Fixed bug #72852 imap_mail null dereference 2016-08-20 01:34:46 +02:00
Aaron Piotrowski
24237027bc Merge branch 'throw-error-in-extensions' 2016-07-05 02:08:39 -05:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
e3c681aa5c Merge branch 'master' into throw-error-in-extensions 2016-06-10 22:02:23 -05:00
Anatol Belski
655e5dd99d remove unused vars 2016-03-01 10:52:49 +01:00
Anatol Belski
acbbe76d7b fix possible pointer truncation on win64 2016-03-01 10:51:55 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Anatol Belski
906670b817 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  ext/imap/config.m4: fix conftest segfault in utf8_to_mutf7 check, bug #66909.
  ext/dba/config.m4: Autodetect Berkeley DB v5.3.
  fix path separator in test
  Bumped SAPI version to 6.9
  Added "mod_auth_basic" to apache module list.
  Add sanitizing checks for request data.
  Clear secret after use.
  Fixed __DIR__ in CLI mode.
  Add PDO_Firebird fix in NEWS
2015-12-09 12:05:01 +01:00
Michael Orlitzky
24f21a3012 ext/imap/config.m4: fix conftest segfault in utf8_to_mutf7 check, bug #66909.
The test program for utf8_to_mutf7 attempts to call it without
arguments. The function expects one argument, however, and this leads
to a segfault as reported in PHP bug #66909.

The test program is using the PHP_IMAP_TEST_BUILD macro which
complicates things a little. To keep this diff small, the
PHP_IMAP_TEST_BUILD macro was modified to pass a fifth argument
"extra-source" to the PHP_TEST_BUILD macro. The check for
utf8_to_mutf7 was then modified to check for a dummy function,
utf8_to_mutf7_php, which passes the correct number of arguments to
utf8_to_mutf7.

PHP-Bug: https://bugs.php.net/bug.php?id=66909
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=376735
2015-12-09 12:04:16 +01:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Christoph M. Becker
ce3c869d19 Fix #70158: Building with static imap fails
Static builds of ext/imap have duplicate symbols, and so won't link on Windows.
To get around this issue, we simply disallow static building of the extension.
2015-07-29 17:00:37 +02:00
Aaron Piotrowski
907476f34c Convert E_ERROR to thrown Error in extensions 2015-07-05 12:16:57 -05:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Xinchen Hui
50ae5b31b4 Ported imap 2015-02-02 14:35:50 +08:00