]> git.pld-linux.org Git - packages/gzip.git/blame - gzip-segfault.patch
- rel 6 for th
[packages/gzip.git] / gzip-segfault.patch
CommitLineData
9291b747 1--- gzip-1.3.5/deflate.c 2003-04-03 21:51:36.000000000 +1000
2+++ gzip-1.3.5-aj/deflate.c 2003-04-03 21:56:38.000000000 +1000
3@@ -643,7 +643,8 @@
4 /* Find the longest match, discarding those <= prev_length.
5 * At this point we have always match_length < MIN_MATCH
6 */
7- if (hash_head != NIL && strstart - hash_head <= MAX_DIST) {
8+ if (hash_head != NIL && strstart - hash_head <= MAX_DIST &&
9+ strstart <= window_size - MIN_LOOKAHEAD) {
10 /* To simplify the code, we prevent matches with the string
11 * of window index 0 (in particular we have to avoid a match
12 * of the string with itself at the start of the input file).
13@@ -737,7 +738,8 @@
14 match_length = MIN_MATCH-1;
15
16 if (hash_head != NIL && prev_length < max_lazy_match &&
17- strstart - hash_head <= MAX_DIST) {
18+ strstart - hash_head <= MAX_DIST &&
19+ strstart <= window_size - MIN_LOOKAHEAD) {
20 /* To simplify the code, we prevent matches with the string
21 * of window index 0 (in particular we have to avoid a match
22 * of the string with itself at the start of the input file).
23
This page took 0.074673 seconds and 4 git commands to generate.