]> wimlib.net Git - wimlib/commitdiff
wimlib_create_decompressor(): Fail if max_block_size == 0
authorEric Biggers <ebiggers3@gmail.com>
Wed, 20 Aug 2014 02:03:58 +0000 (21:03 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 20 Aug 2014 02:03:58 +0000 (21:03 -0500)
src/decompress.c

index 9287ca092767e56182dad10a927e700edb8e168f..4ebd940d0ac074ce7d8e52ca122b84b09c9ce159 100644 (file)
@@ -62,6 +62,9 @@ wimlib_create_decompressor(enum wimlib_compression_type ctype,
        if (dec_ret == NULL)
                return WIMLIB_ERR_INVALID_PARAM;
 
+       if (max_block_size == 0)
+               return WIMLIB_ERR_INVALID_PARAM;
+
        if (!decompressor_ctype_valid(ctype))
                return WIMLIB_ERR_INVALID_COMPRESSION_TYPE;