com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/bz2 /bz2.c
ext/curl/tests/curl_version_variation1.php t ext/date/lib/parse_date.re ext/gd/gd.c ext/mbstri ng/php_mbregex.c ext/phar/phar_object.c ext/simplex
ml/simplexml.c ext/spl/spl_fixedarray.c ext/standard/ iptc.c ext/standard/uuencode.c
| From: | Anatol Belski | Date: | Wed, 14 May 2014 06:21:12 +0000 |
| Subject: | com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/bz2 /bz2.c ext/curl/tests/curl_version_variation1.php t ext/date/lib/parse_date.re ext/gd/gd.c ext/mbstri ng/php_mbregex.c ext/phar/phar_object.c ext/simplex ml/simplexml.c ext/spl/spl_fixedarray.c ext/standard/ iptc.c ext/standard/uuencode.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78536@lists.php.net to get a copy of this message | ||
Commit: 1ddecc9d12c506d69b7c2a4b7d25ec52d65add87
Author: Anatol Belski <ab@php.net> Wed, 14 May 2014 08:21:12 +0200
Parents: a582692720b0b8b857b755d507a982c130e3a425 5a169310f0d046f3acdf2872e58a7d01710beaa2
Branches: str_size_and_int64_56_backport
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ddecc9d12c506d69b7c2a4b7d25ec52d65add87
Log:
Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport
* origin/PHP-5.6: (32 commits)
5.4.30 next
enable email notifications
update NEWS
update NEWS
update NEWS
- Updated to version 2014.3 (2014c)
fix test - output can be chunked
fix test
Fixed test for commit 997be125eb0228c5b1b6dd278f617791e71192c6
Add bug fix to NEWS
Update UPGRADING according to bug fix
improve CURL tests to allow testing without separate server
Fixed bug #67199 mb_regex_encoding mishmash
fix bug #67253: timelib_meridian_with_check out-of-bounds read
Fix bug #67252: convert_uudecode out-of-bounds read
Fix bug #67251 - date_parse_from_format out-of-bounds read
Fix bug #67250 (iptcparse out-of-bounds read)
Fix bug #67248 (imageaffinematrixget missing check of parameters)
Fix bug #67247 spl_fixedarray_resize integer overflow
fix news
...
Conflicts:
ext/gd/gd.c
ext/standard/iptc.c
Bugs:
https://bugs.php.net/67199
https://bugs.php.net/67253
https://bugs.php.net/67252
https://bugs.php.net/67251
https://bugs.php.net/67250
https://bugs.php.net/67248
https://bugs.php.net/67247
Changed paths:
MM ext/bz2/bz2.c
MM ext/curl/tests/curl_version_variation1.phpt
MM ext/date/lib/parse_date.re
MM ext/gd/gd.c
MM ext/mbstring/php_mbregex.c
MM ext/phar/phar_object.c
MM ext/simplexml/simplexml.c
MM ext/spl/spl_fixedarray.c
MM ext/standard/iptc.c
MM ext/standard/uuencode.c
Diff:
diff --cc ext/gd/gd.c
index 4d9fa99,f67e80b..df25f15
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@@ -3976,7 -3970,7 +3976,7 @@@ PHP_FUNCTION(imagepscopyfont
gd_ps_font *nf_ind, *of_ind;
long fnt;
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &fnt) == FAILURE) {
++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &fnt) == FAILURE) {
return;
}
@@@ -5119,10 -5111,10 +5119,10 @@@ PHP_FUNCTION(imagescale
gdImagePtr im;
gdImagePtr im_scaled = NULL;
int new_width, new_height;
- long tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED;
+ php_int_t tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED;
gdInterpolationMethod method;
-- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &tmp_w,
&tmp_h, &tmp_m) == FAILURE) {
++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ri|ii", &IM, &tmp_w,
&tmp_h, &tmp_m) == FAILURE) {
return;
}
method = tmp_m;
@@@ -5281,8 -5273,8 +5281,8 @@@ PHP_FUNCTION(imageaffine
PHP_FUNCTION(imageaffinematrixget)
{
double affine[6];
- long type;
+ php_int_t type;
- zval *options;
+ zval *options = NULL;
zval **tmp;
int res = GD_FALSE, i;
diff --cc ext/spl/spl_fixedarray.c
index 6f808fd,2ad5035..7c6765f
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@@ -116,10 -116,10 +116,10 @@@ static void spl_fixedarray_resize(spl_f
array->elements = NULL;
}
} else if (size > array->size) {
- array->elements = erealloc(array->elements, sizeof(zval *) * size);
+ array->elements = safe_erealloc(array->elements, size, sizeof(zval *), 0);
memset(array->elements + array->size, '\0', sizeof(zval *) * (size -
array->size));
} else { /* size < array->size */
- long i;
+ php_int_t i;
for (i = size; i < array->size; i++) {
if (array->elements[i]) {
diff --cc ext/standard/iptc.c
index 4da0445,ad4fa65..019ef14
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@@ -329,8 -329,11 +329,11 @@@ PHP_FUNCTION(iptcparse
recnum = buffer[ inx++ ];
if (buffer[ inx ] & (unsigned char) 0x80) { /* long tag */
+ if((inx+6) >= str_len) {
+ break;
+ }
- len = (((long) buffer[ inx + 2 ]) << 24) + (((long) buffer[ inx + 3 ]) << 16) +
- (((long) buffer[ inx + 4 ]) << 8) + (((long) buffer[ inx + 5 ]));
+ len = (((php_int_t) buffer[ inx + 2 ]) << 24) + (((php_int_t) buffer[ inx + 3 ]) <<
16) +
+ (((php_int_t) buffer[ inx + 4 ]) << 8) + (((php_int_t) buffer[ inx + 5 ]));
inx += 6;
} else { /* short tag */
len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];