Browse Source

make sure that hash-function always uses a 32bit int (fixes #1279)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1908 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Jan Kneschke 14 years ago
parent
commit
41271d5cf6
  1. 1
      NEWS
  2. 4
      src/etag.c

1
NEWS

@ -5,6 +5,7 @@ NEWS
- 1.4.17 -
* fixed hardcoded font-sizes in mod_dirlisting (#1267)
* fixed different ETag length on 32/64 platforms (#1279)
- 1.4.16 -

4
src/etag.c

@ -1,4 +1,5 @@
#include <string.h>
#include <stdint.h>
#include "buffer.h"
#include "etag.h"
@ -31,7 +32,8 @@ int etag_create(buffer *etag, struct stat *st,etag_flags_t flags) {
}
int etag_mutate(buffer *mut, buffer *etag) {
size_t h, i;
size_t i;
uint32_t h;
for (h=0, i=0; i < etag->used; ++i) h = (h<<5)^(h>>27)^(etag->ptr[i]);

Loading…
Cancel
Save