From: Pierre Joye Date: Tue, 27 Oct 2009 10:41:45 +0000 (+0000) Subject: - #48752, crash during date parsing with invalid date X-Git-Tag: php-5.4.0alpha1~191^2~2458 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5f67497417ac42d8f899af24c90ccf129794747;p=php - #48752, crash during date parsing with invalid date --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0528db28c9..1b1dd752d9 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -622,6 +622,7 @@ PHP_RINIT_FUNCTION(date) } DATEG(timezone) = NULL; DATEG(tzcache) = NULL; + DATEG(last_errors) = NULL; return SUCCESS; } @@ -639,6 +640,11 @@ PHP_RSHUTDOWN_FUNCTION(date) FREE_HASHTABLE(DATEG(tzcache)); DATEG(tzcache) = NULL; } + if (DATEG(last_errors)) { + timelib_error_container_dtor(DATEG(last_errors)); + DATEG(last_errors) = NULL; + } + return SUCCESS; } /* }}} */