]> wimlib.net Git - wimlib/commit
lzx_compress: fix corruption with long literal run
authorEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jan 2017 08:56:39 +0000 (00:56 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jan 2017 09:19:41 +0000 (01:19 -0800)
commitfc50e25e550d8ca4a53dbbbb73d1ae0454fd7fdd
treebea8c0d8b1569756b3f77816bbd0263cb32ecb6a
parent533c97bba23794f9bd014626dd1ba2477c628919
lzx_compress: fix corruption with long literal run

The last round of updates to the LZX compressor made it start being able
to use larger blocks, up to ~100KB.  Unfortunately it was overlooked
that this allows literal runs > 65535 bytes while in one place the
length of a literal run was still being stored in a u16.  Therefore, on
incompressible input data this could be wrapped around, causing
incorrect compression.  Fix this by enlarging the variable.
NEWS
src/lzx_compress.c