From c634a51de6774aba3f10331caea9cb93bb2d454e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Thu, 9 Apr 2009 16:51:54 +0000 Subject: [PATCH] Fix hashing the terminating zero in etag.c git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2438 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/etag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etag.c b/src/etag.c index 630956ff..c44278b8 100644 --- a/src/etag.c +++ b/src/etag.c @@ -44,7 +44,7 @@ int etag_mutate(buffer *mut, buffer *etag) { size_t i; uint32_t h; - for (h=0, i=0; i < etag->used; ++i) h = (h<<5)^(h>>27)^(etag->ptr[i]); + for (h=0, i=0; i < etag->used-1; ++i) h = (h<<5)^(h>>27)^(etag->ptr[i]); buffer_reset(mut); buffer_copy_string_len(mut, CONST_STR_LEN("\""));