buffer-overflow fix (thanks to m^2) · inikep/lizard@95b068e (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit 95b068e
buffer-overflow fix (thanks to m^2)
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1092,7 +1092,7 @@ FORCE_INLINE int LZ5_decompress_generic( | ||
1092 | 1092 | } else { MEM_copy8(op, match); match+=8; } |
1093 | 1093 | op += 8; |
1094 | 1094 | |
1095 | -if (unlikely(cpy>oend-12)) | |
1095 | +if (unlikely(cpy>oend-(16-MINMATCH))) | |
1096 | 1096 | { |
1097 | 1097 | BYTE* const oCopyLimit = oend-(WILDCOPYLENGTH-1); |
1098 | 1098 | if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ |