mirror of https://github.com/mirror/busybox.git
gunzip was incorrectly reporting a failed crc and length (discovered by
Chang, Shu-Hao). The bitbuffer needs to be unwound after decompression, as it was eating into the crc/size field.1_00_stable_10817
parent
8a35c9a557
commit
38288bbf4c
|
@ -875,6 +875,14 @@ static int inflate(void)
|
|||
}
|
||||
} while (!e);
|
||||
|
||||
/* Undo too much lookahead. The next read will be byte aligned so we
|
||||
* can discard unused bits in the last meaningful byte.
|
||||
*/
|
||||
while (bk >= 8) {
|
||||
bk -= 8;
|
||||
ungetc((bb << bk), in_file);
|
||||
}
|
||||
|
||||
/* flush out window */
|
||||
flush_window();
|
||||
|
||||
|
|
|
@ -875,6 +875,14 @@ static int inflate(void)
|
|||
}
|
||||
} while (!e);
|
||||
|
||||
/* Undo too much lookahead. The next read will be byte aligned so we
|
||||
* can discard unused bits in the last meaningful byte.
|
||||
*/
|
||||
while (bk >= 8) {
|
||||
bk -= 8;
|
||||
ungetc((bb << bk), in_file);
|
||||
}
|
||||
|
||||
/* flush out window */
|
||||
flush_window();
|
||||
|
||||
|
|
|
@ -875,6 +875,14 @@ static int inflate(void)
|
|||
}
|
||||
} while (!e);
|
||||
|
||||
/* Undo too much lookahead. The next read will be byte aligned so we
|
||||
* can discard unused bits in the last meaningful byte.
|
||||
*/
|
||||
while (bk >= 8) {
|
||||
bk -= 8;
|
||||
ungetc((bb << bk), in_file);
|
||||
}
|
||||
|
||||
/* flush out window */
|
||||
flush_window();
|
||||
|
||||
|
|
Loading…
Reference in New Issue