X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_date_api.c;h=78a5da1938da7935a83acf587c4b6ccfe1ecaffd;hp=e750a4da49863cec0d1077bd580ba5073dd84309;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=b51b3809f61db4904df3b9c034bbde879732f0b9 diff --git a/http_date_api.c b/http_date_api.c index e750a4d..78a5da1 100644 --- a/http_date_api.c +++ b/http_date_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -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",