X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fdecompress.c;h=502ca47d69f4935fa95b41b9218bc53248c64bda;hb=8e5d4209c12a7436488d9a3d1f8d59383c5c48f2;hp=1ef88236a3df38de28c8b569b9fb893881335361;hpb=61db93f82eca3fe9f7676355c709c58cc425a6ad;p=wimlib diff --git a/src/decompress.c b/src/decompress.c index 1ef88236..502ca47d 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -28,6 +28,7 @@ #endif #include "wimlib/decompress.h" +#include "wimlib/error.h" #include "wimlib/util.h" #include @@ -53,7 +54,8 @@ * @decode_table: The array in which to create the fast huffman decoding * table. It must have a length of at least * (2**table_bits) + 2 * num_syms to guarantee - * that there is enough space. + * that there is enough space. Also must be 16-byte + * aligned (at least when USE_SSE2_FILL gets defined). * * @num_syms: Number of symbols in the alphabet, including symbols * that do not appear in this particular input chunk. @@ -416,10 +418,8 @@ read_huffsym_near_end_of_input(struct input_bitstream *istream, if (sym >= num_syms) { bitstream_remove_bits(istream, key_size); do { - if (bitsleft == 0) { - DEBUG("Input stream exhausted"); + if (bitsleft == 0) return -1; - } key_bits = sym + bitstream_peek_bits(istream, 1); bitstream_remove_bits(istream, 1); bitsleft--;