flate: fix wrong adler32() length calculation (thanks qrstuv)
This commit is contained in:
parent
ffe862c543
commit
8ac28ac11c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue