Commit Graph

682 Commits

Author SHA1 Message Date
Remi Collet
6af22d0d3e Fix #73956 Link use CC instead of CXX 2017-01-18 13:00:49 +01:00
Dmitry Stogov
7f22e3c879 Fixed bad merge 2016-12-01 16:21:57 +03:00
Dmitry Stogov
b7b7dd8cea Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Workaround for GCC-4.9.2 bug
  oops, changed in wrong place
2016-12-01 15:50:05 +03:00
Stanislav Malyshev
c8778eb293 oops, changed in wrong place 2016-11-27 16:11:41 -08:00
Stanislav Malyshev
f1a9851c3e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #68447: grapheme_extract take an extra trailing character
2016-11-27 15:36:29 -08:00
Stanislav Malyshev
8856b3a63c Merge branch 'pull-request/1974' into PHP-5.6
* pull-request/1974:
  Fix #68447: grapheme_extract take an extra trailing character
2016-11-27 15:34:58 -08:00
Anatol Belski
5e9b4c26a5 remove TSRMLS_* 2016-11-21 23:53:37 +01:00
Stanislav Malyshev
1fd18821e0 More string length checks & fixes 2016-11-03 21:35:09 -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
0f9a4af90b make config.w32 compatible with ICU 58 2016-10-26 13:05:03 +02:00
Anatol Belski
58b18892bf update len in fallback cases 2016-10-12 20:52:46 +02:00
Anatol Belski
7c6cb1282d fix test 2016-10-12 16:03:09 +02:00
Anatol Belski
aaa5d07365 avoid strlen 2016-10-12 13:28:23 +02:00
Stanislav Malyshev
b26b02b2df Bug #73218: add mitigation for ICU int overflow
(cherry picked from commit d946d10293)
2016-10-12 13:22:51 +02:00
Stanislav Malyshev
87a8240b5a Add more locale length checks, due to ICU bugs.
(cherry picked from commit d3eb58332a)
2016-10-12 13:11:16 +02:00
Stanislav Malyshev
082d1f2375 Fix tests 2016-10-11 16:18:08 -07:00
Stanislav Malyshev
d946d10293 Bug #73218: add mitigation for ICU int overflow 2016-10-04 22:40:43 -07:00
Stanislav Malyshev
d3eb58332a Add more locale length checks, due to ICU bugs. 2016-10-04 21:28:40 -07:00
Stanislav Malyshev
6d55ba2656 Fix bug #73007: add locale length check 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
92db16e456 Fix bug #73007: add locale length check
(cherry picked from commit 9e07089626f373d0e7b24b7aeb8b8459aae5f5f8)

Conflicts:
	ext/intl/msgformat/msgformat_format.c
2016-09-12 17:19:47 +02:00
Anatol Belski
3437dbfa00 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix double free
2016-08-29 19:33:22 +02:00
Anatol Belski
1a840b9af0 fix double free 2016-08-29 19:27:47 +02:00
Anatol Belski
1d93086937 fix double free 2016-08-29 18:56:25 +02:00
Christoph M. Becker
078f674212 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-20 03:04:08 +02:00
Christoph M. Becker
e4a006cd3e Fix #65732: grapheme_*() is not Unicode compliant on CR LF sequence
According to the Unicode specification (at least as of 5.1), CRLF sequences
are considered to be a single grapheme. We cater to that special case by
letting grapheme_ascii_check() fail. While it would be trivial to fix
grapheme_ascii_check() wrt. grapheme_strlen(), grapheme_substr() and
grapheme_strrpos() would be much harder to handle, so we accept the slight
performance penalty if CRLF is involved.
2016-08-20 03:01:35 +02:00
Nikita Popov
aecc435482 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-24 00:18:47 +02:00
Nikita Popov
04b42b1e05 More tolerance in another IntlCalendar test
Again, off-by-1000 is expected if we're late in the second. Add an
extra 1000 to account for actual delta in call times.
2016-07-24 00:15:14 +02:00
Nikita Popov
7d77289717 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-22 17:22:13 +02:00
Nikita Popov
4fc1bfa93b Make IntlCalendar::getNow() test more tolerant
Due to the *1000 factor the two values may be off-by-1000 even
without any actual delay, so increase the check to 2000.
2016-07-22 17:20:56 +02:00
Xinchen Hui
4a643e5e13 Fixed bug #72639 (Segfault when instantiating class that extends IntlCalendar and adds a property) 2016-07-21 14:25:15 +08:00
Stanislav Malyshev
b00f8f2a5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  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 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
  Fix bug #72562 - destroy var_hash properly
  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
  Fix for HTTP_PROXY issue.
  5.6.24RC1
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	Zend/zend_virtual_cwd.c
	ext/bz2/bz2.c
	ext/exif/exif.c
	ext/session/session.c
	ext/snmp/snmp.c
	ext/standard/basic_functions.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 01:39:28 -07:00
Stanislav Malyshev
4d0565b5ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  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 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
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	ext/bz2/bz2.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 00:53:08 -07:00
Stanislav Malyshev
aa82e99ed8 Fix bug #72533 (locale_accept_from_http out-of-bounds access) 2016-07-12 22:37:36 -07:00
Christoph M. Becker
5fbcc2b90f Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/intl/idn/idn.c
2016-07-12 14:52:23 +02:00
Christoph M. Becker
76e249d31c Partially fix #72506: idn_to_ascii for UTS #46 incorrect for long domain names
We don't actually fix this issue wrt. the empty $info array, because it is
not clear what this array should contain and we're concerned about the
potential BC break, but at least we fix the inconsistent handling of
resulting domains with 255 bytes (which raise an error), and longer domains
(which just return FALSE), what has to be considered a very minor BC break
if at all.
2016-07-12 14:47:14 +02:00
SATO Kentaro
df683fa3b0 Fix #68447: grapheme_extract take an extra trailing character
grapheme_extract() converts UTF-8 string in the argument to UTF-16 to
iterate through graphemes, and count each UTF-16 character as one Unicode
character, which is not correct for UTF-16 surrogate pairs.
The patch removes the conversion and counts UTF-8 directly if needed.
2016-07-01 22:45:37 +09:00
Xinchen Hui
958f18c1a1 Fixed "implicit declaration of function ‘msgformat_fix_quotes’" 2016-06-17 15:59:41 +08:00
Anatol Belski
edb8c3f6e3 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Add test for bug #53735
2016-06-06 21:07:45 +02:00
Anatol Belski
2a0ed8a2eb Add test for bug #53735 2016-06-06 21:06:06 +02:00
Anatol Belski
22336db97f Fixed bug #70484 selectordinal doesn't work with named parameters 2016-06-02 12:17:42 +02:00
Stanislav Malyshev
3ed0114e7f Merge branch 'PHP-5.5' into PHP-7.0.7
* PHP-5.5:
  Fix memory leak in imagescale()
  Update NEWS
  Better fix for bug #72135
  Fixed bug #72227: imagescale out-of-bounds read
  Fix bug #72241: get_icu_value_internal out-of-bounds read
  Fix bug #72135 - don't create strings with lengths outside int range
  Add check for string overflow to all string add operations
  Fix bug #72114 - int/size_t confusion in fread
  Updated NEWS
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()

Conflicts:
	Zend/zend_operators.c
	ext/intl/locale/locale_methods.c
	ext/phar/dirstream.c
	ext/phar/tests/bug71331.phpt
	ext/standard/file.c
	ext/standard/html.c
2016-05-24 18:05:06 -07:00
Stanislav Malyshev
544940c48a Merge branch 'PHP-5.5' into PHP-5.6.22
* PHP-5.5:
  Fix memory leak in imagescale()
  Update NEWS
  Better fix for bug #72135
  Fixed bug #72227: imagescale out-of-bounds read
  Fix bug #72241: get_icu_value_internal out-of-bounds read
  Fix bug #72135 - don't create strings with lengths outside int range
  Add check for string overflow to all string add operations
  Fix bug #72114 - int/size_t confusion in fread
  Updated NEWS
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()

Conflicts:
	Zend/zend_operators.c
	ext/phar/dirstream.c
	ext/phar/tests/bug71331.phpt
2016-05-24 16:56:36 -07:00
Stanislav Malyshev
97eff7eb57 Fix bug #72241: get_icu_value_internal out-of-bounds read 2016-05-22 17:49:02 -07:00
Anatol Belski
33d41da347 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix memory leak
  Fix bug #72099: xml_parse_into_struct segmentation fault
  5.5.36 now
  Fix bug #72094 - Out of bounds heap read access in exif header processing
  Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
  Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
  Fix for bug #71912 (libgd: signedness vulnerability)
  Typo in NEWS
2016-04-27 11:45:29 +02:00
Stanislav Malyshev
e315a162da Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix memory leak
  Fix bug #72099: xml_parse_into_struct segmentation fault
  5.5.36 now
  Fix bug #72094 - Out of bounds heap read access in exif header processing
  Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
  Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
  Fix for bug #71912 (libgd: signedness vulnerability)
  Typo in NEWS

Conflicts:
	configure.in
	main/php_version.h
2016-04-26 23:48:41 -07:00
Stanislav Malyshev
fd9689745c Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset 2016-04-24 13:15:17 -07:00
Anatol Belski
28b6f66a77 Fixed bug #70484 selectordinal doesn't work with named parameters 2016-04-11 15:01:22 +02:00
Anatol Belski
f62943edc8 fix version macro to check 2016-04-11 15:01:22 +02:00
Joe Watkins
707941413d Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-04-11 08:04:14 +01:00