diff options
author | BellaXlp <2273816832@qq.com> | 2020-08-13 05:42:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 14:42:10 -0700 |
commit | ab713923a24d52a6c3d0835627b3f0d715955467 (patch) | |
tree | a36aeabb98f3cc461085eadf9c4b72a93d625f12 /lib/lz4.c | |
parent | f9f3fdfb1cb3b359a81247b9b72e08f435a1f5e3 (diff) | |
download | lz4-ab713923a24d52a6c3d0835627b3f0d715955467.tar.gz lz4-ab713923a24d52a6c3d0835627b3f0d715955467.tar.bz2 lz4-ab713923a24d52a6c3d0835627b3f0d715955467.zip |
fix issue #783 (#862)
* fix issue #783
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1931,7 +1931,7 @@ LZ4_decompress_generic( /* If we're in this block because of the input parsing condition, then we must be on the * last sequence (or invalid), so we must check that we exactly consume the input. */ - if ((ip+length>iend-(2+1+LASTLITERALS)) && (ip+length != iend)) { goto _output_error; } + if ((ip+length>iend-(2+1+LASTLITERALS)) && (ip+length != iend) && (cpy != oend)) { goto _output_error; } assert(ip+length <= iend); /* We are finishing in the middle of a literals segment. * Break after the copy. |