]> git.ipfire.org Git - thirdparty/zstd.git/commit
ZSTD_compressSequences_internal assert op <= oend (#1667)
authorNick Terrell <terrelln@fb.com>
Tue, 2 Jul 2019 22:45:47 +0000 (15:45 -0700)
committerGitHub <noreply@github.com>
Tue, 2 Jul 2019 22:45:47 +0000 (15:45 -0700)
commit6c92ba774e269b950e0ed13f76b68d81612f2430
tree90f7e235f9a4986510e20aa09da2b54872af64df
parent857e608b5138dafd579eabfda85803087d658e59
ZSTD_compressSequences_internal assert op <= oend (#1667)

When we wrote one byte beyond the end of the buffer for RLE
blocks back in 1.3.7, we would then have `op > oend`. That is
a problem when we use `oend - op` for the size of the destination
buffer, and allows further writes beyond the end of the buffer for
the rest of the function. Lets assert that it doesn't happen.
lib/compress/zstd_compress.c