From: Michael Wallner Date: Wed, 30 Dec 2009 14:57:04 +0000 (+0000) Subject: * attempt to fix pecl Bug #16826 http_date strange behavior and crash X-Git-Tag: RELEASE_1_7_0~20 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=7bbcfb71b7dbd020652a70181d483dc2056f7296 * attempt to fix pecl Bug #16826 http_date strange behavior and crash --- diff --git a/http_date_api.c b/http_date_api.c index 6d6e58c..e6fd511 100644 --- a/http_date_api.c +++ b/http_date_api.c @@ -142,8 +142,9 @@ static inline int check_tzone(const char *tzone) PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC) { char *date = NULL; - struct tm *gmtime, tmbuf; + struct tm *gmtime = NULL, tmbuf; + memset(&tmbuf, 0, sizeof(tmbuf)); if ((gmtime = php_gmtime_r(&t, &tmbuf))) { spprintf(&date, 0, "%s, %02d %s %04d %02d:%02d:%02d GMT",