]> git.ipfire.org Git - thirdparty/zstd.git/commit
fileio: clamp value of windowLog in patch-mode (#2637)
authorOlivier Perret <Olivier.Perret@mailbox.org>
Wed, 12 May 2021 20:11:15 +0000 (22:11 +0200)
committerGitHub <noreply@github.com>
Wed, 12 May 2021 20:11:15 +0000 (16:11 -0400)
commitd4548c96cb073a575eb616cdff1a95d12f631547
tree9da592b85ac2881174e3b06579fe326f4ea61d81
parentc730b8c5a38b9e93efc0c3639e26f18f14b82f95
fileio: clamp value of windowLog in patch-mode (#2637)

With small enough input files, the inferred value of fileWindowLog could
be smaller than ZSTD_WINDOWLOG_MIN.

This can be reproduced like so:
$ echo abc > small
$ echo abcdef > small2
$ zstd --patch-from small small2 -o patch
previously, this would fail with the error "zstd: error 11 : Parameter is out of bound"
programs/fileio.c