summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2019-01-25 22:47:15 (GMT)
committerDave Watson <davejwatson@fb.com>2019-02-08 21:57:23 (GMT)
commit232f1e261fce421542e0cf7549f25e3064006bf0 (patch)
tree918da49753779b95c4855c380582dc912421d11c /lib/lz4.c
parent59332a3026eaff40e4c6d3c627bdb51bfd26fea1 (diff)
downloadlz4-232f1e261fce421542e0cf7549f25e3064006bf0.zip
lz4-232f1e261fce421542e0cf7549f25e3064006bf0.tar.gz
lz4-232f1e261fce421542e0cf7549f25e3064006bf0.tar.bz2
decompress_generic: drop partial copy check in fast loop
We've already checked that we are more than FASTLOOP_SAFE_DISTANCE away from the end, so this branch can never be true, we will have already jumped to the second decode loop.
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 978a957..915ee74 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1632,20 +1632,6 @@ LZ4_decompress_generic(
/* partialDecoding : may not respect endBlock parsing restrictions */
assert(op<=oend);
- if (partialDecoding && (cpy > oend-MATCH_SAFEGUARD_DISTANCE)) {
- size_t const mlen = MIN(length, (size_t)(oend-op));
- const BYTE* const matchEnd = match + mlen;
- BYTE* const copyEnd = op + mlen;
- if (matchEnd > op) { /* overlap copy */
- while (op < copyEnd) *op++ = *match++;
- } else {
- memcpy(op, match, mlen);
- }
- op = copyEnd;
- if (op==oend) goto decode_done;
- continue;
- }
-
if (unlikely(offset<16)) {
if (offset < 8) {
op[0] = match[0];
@@ -1858,7 +1844,6 @@ LZ4_decompress_generic(
}
op = cpy; /* wildcopy correction */
}
- decode_done:
/* end of decoding */
if (endOnInput)