From: Eric Biggers Date: Wed, 20 Aug 2014 02:03:58 +0000 (-0500) Subject: wimlib_create_decompressor(): Fail if max_block_size == 0 X-Git-Tag: v1.7.2~60 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=c78f76969f2f3c68b830defd4d495563a41e7129 wimlib_create_decompressor(): Fail if max_block_size == 0 --- diff --git a/src/decompress.c b/src/decompress.c index 9287ca09..4ebd940d 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -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;