Browse Source

Fixed bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer

pull/388/merge
Remi Collet 13 years ago
parent
commit
6fab1caa41
  1. 2
      NEWS
  2. 4
      ext/date/php_date.c

2
NEWS

@ -25,6 +25,8 @@ PHP NEWS
- Datetime:
. Fixed bug #65554 (createFromFormat broken when weekday name is followed
by some delimiters). (Valentin Logvinskiy, Stas).
. Fixed bug #65564 (stack-buffer-overflow in DateTimeZone stuff caught
by AddressSanitizer). (Remi).
- OPCache:
. Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4).

4
ext/date/php_date.c

@ -2305,7 +2305,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC)
MAKE_STD_ZVAL(zv);
ZVAL_LONG(zv, tzobj->type);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zv), NULL);
MAKE_STD_ZVAL(zv);
switch (tzobj->type) {
@ -2327,7 +2327,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC)
ZVAL_STRING(zv, tzobj->tzi.z.abbr, 1);
break;
}
zend_hash_update(props, "timezone", 9, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone", 9, &zv, sizeof(zv), NULL);
return props;
}

Loading…
Cancel
Save