projects
/
platform
/
upstream
/
lz4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2a4d6e
)
fixed byPtr match search
author
test4973
<Kdo4973@hotmail.com>
Fri, 6 Apr 2018 00:52:54 +0000
(17:52 -0700)
committer
test4973
<Kdo4973@hotmail.com>
Fri, 6 Apr 2018 00:52:54 +0000
(17:52 -0700)
lib/lz4.c
patch
|
blob
|
history
diff --git
a/lib/lz4.c
b/lib/lz4.c
index
8d8c1e8
..
5791556
100644
(file)
--- a/
lib/lz4.c
+++ b/
lib/lz4.c
@@
-694,7
+694,8
@@
LZ4_FORCE_INLINE int LZ4_compress_generic(
forwardH = LZ4_hashPosition(forwardIp, tableType);
LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base);
- } while ( LZ4_read32(match) != LZ4_read32(ip) );
+ } while ( (match+MAX_DISTANCE < ip)
+ || (LZ4_read32(match) != LZ4_read32(ip)) );
} else { /* byU32, byU16 */