diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-23 14:54:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-23 14:54:13 +0200 |
commit | 58d998d2f927c20f2ba728611df587ac8ec8bda9 (patch) | |
tree | 78d82e465efb68b67b74e7edc8b1ea21f8bbf731 | |
parent | 028c5aa18b5273c029f0278232d922ee1a164de6 (diff) | |
download | busybox-w32-58d998d2f927c20f2ba728611df587ac8ec8bda9.tar.gz busybox-w32-58d998d2f927c20f2ba728611df587ac8ec8bda9.tar.bz2 busybox-w32-58d998d2f927c20f2ba728611df587ac8ec8bda9.zip |
bunzip2: the correct condition is "n < groupCount", not "n <= groupCount". Closes 11896
function old new delta
get_next_block 1677 1681 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/libarchive/decompress_bunzip2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c index 78366f26a..1f535b32a 100644 --- a/archival/libarchive/decompress_bunzip2.c +++ b/archival/libarchive/decompress_bunzip2.c | |||
@@ -235,9 +235,9 @@ static int get_next_block(bunzip_data *bd) | |||
235 | /* Get next value */ | 235 | /* Get next value */ |
236 | int n = 0; | 236 | int n = 0; |
237 | while (get_bits(bd, 1)) { | 237 | while (get_bits(bd, 1)) { |
238 | n++; | ||
238 | if (n >= groupCount) | 239 | if (n >= groupCount) |
239 | return RETVAL_DATA_ERROR; | 240 | return RETVAL_DATA_ERROR; |
240 | n++; | ||
241 | } | 241 | } |
242 | /* Decode MTF to get the next selector */ | 242 | /* Decode MTF to get the next selector */ |
243 | tmp_byte = mtfSymbol[n]; | 243 | tmp_byte = mtfSymbol[n]; |