X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_date_api.c;h=78a5da1938da7935a83acf587c4b6ccfe1ecaffd;hp=6d6e58c30f9f4a4ef912b15d8fbf30fcb92bde50;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=aca5a5a21e4514707a71cfa69cc19ae50a78f5d3 diff --git a/http_date_api.c b/http_date_api.c index 6d6e58c..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-2007, 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",