diff options
author | Stefan Bühler <stbuehler@web.de> | 2015-07-05 20:19:17 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2015-07-05 20:19:17 +0000 |
commit | cfc88cf8f22e015d9e65e292bae6e0989a22c016 (patch) | |
tree | 0c5dd5ce681af08b0492d8ad84c9b329c25bc9ad | |
parent | 9f05b61ab4fe96d5e8ca376e0debd1543bfb419c (diff) | |
download | lighttpd-git-cfc88cf8f22e015d9e65e292bae6e0989a22c016.tar.gz |
check pointer before usage in new etag compare
From: Stefan Bühler <stbuehler@web.de>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2995 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | src/etag.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -20,7 +20,7 @@ int etag_is_equal(buffer *etag, const char *line, int weak_ok) { } state = START; const char *current; - const char *tok_start = etag->ptr; + const char *tok_start; const char *tok = NULL; int matched; @@ -29,6 +29,7 @@ int etag_is_equal(buffer *etag, const char *line, int weak_ok) { } if (!etag || buffer_string_is_empty(etag)) return 0; + tok_start = etag->ptr; if ('W' == tok_start[0]) { if (!weak_ok || '/' != tok_start[1]) return 0; /* bad etag */ |