Browse Source

Fix uninitialized value in time struct after strptime

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2366 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
3d20850451
  1. 1
      NEWS
  2. 2
      src/http-header-glue.c

1
NEWS

@ -23,6 +23,7 @@ NEWS
* Revert CVE-2008-4359 (#1720) fix "encoding+simplifying urls for rewrite/redirect": too many regressions.
* Use FD_CLOEXEC if possible (fixes #1821)
* Optimized buffer usage in mod_proxy (fixes #1850)
* Fix uninitialized value in time struct after strptime
- 1.4.20 - 2008-09-30

2
src/http-header-glue.c

@ -280,6 +280,7 @@ int http_response_handle_cachable(server *srv, connection *con, buffer *mtime) {
strncpy(buf, con->request.http_if_modified_since, used_len);
buf[used_len] = '\0';
tm.tm_isdst = 0;
if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
con->http_status = 412;
con->mode = DIRECT;
@ -329,6 +330,7 @@ int http_response_handle_cachable(server *srv, connection *con, buffer *mtime) {
strncpy(buf, con->request.http_if_modified_since, used_len);
buf[used_len] = '\0';
tm.tm_isdst = 0;
if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
/**
* parsing failed, let's get out of here

Loading…
Cancel
Save