(Sriram Natarajan)
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
(Sriram Natarajan)
+- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
- Fixed bug #44144 (spl_autoload_functions() should return object instance
when appropriate). (Hannes, Etienne)
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
} else {
snprintf(cookie, len + 100, "Set-Cookie: %s=%s", name, value ? encoded_value : "");
if (expires > 0) {
+ char *p;
strlcat(cookie, "; expires=", len + 100);
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC);
+ /* check to make sure that the year does not exceed 4 digits in length */
+ p = zend_memrchr(dt, '-', strlen(dt));
+ if (*(p + 5) != ' ') {
+ efree(dt);
+ efree(cookie);
+ efree(encoded_value);
+ zend_error(E_WARNING, "Expiry date cannot have a year greater then 9999");
+ return FAILURE;
+ }
strlcat(cookie, dt, len + 100);
efree(dt);
}