diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-20 03:34:40 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-20 03:34:40 +0100 |
commit | 8ac28ac11cb9e96329e4d083208b3f13ee8d2b8a (patch) | |
tree | 2b3ee12ac562758f0cae220625186a90f5675479 /sys/src/libflate | |
parent | ffe862c5433716e81e88602864f7323ff40971c5 (diff) |
flate: fix wrong adler32() length calculation (thanks qrstuv)
Diffstat (limited to 'sys/src/libflate')
-rw-r--r-- | sys/src/libflate/inflatezlibblock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/libflate/inflatezlibblock.c b/sys/src/libflate/inflatezlibblock.c index 477bb4b01..54b2ca130 100644 --- a/sys/src/libflate/inflatezlibblock.c +++ b/sys/src/libflate/inflatezlibblock.c @@ -61,7 +61,7 @@ inflatezlibblock(uchar *dst, int dsize, uchar *src, int ssize) if(ok != FlateOk) return ok; - if(adler32(1, dst, bs.pos - dst) != ((bs.pos[0] << 24) | (bs.pos[1] << 16) | (bs.pos[2] << 8) | bs.pos[3])) + if(adler32(1, dst, bd.pos - dst) != ((bs.pos[0] << 24) | (bs.pos[1] << 16) | (bs.pos[2] << 8) | bs.pos[3])) return FlateCorrupted; return bd.pos - dst; |