From c78f76969f2f3c68b830defd4d495563a41e7129 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 19 Aug 2014 21:03:58 -0500 Subject: [PATCH] wimlib_create_decompressor(): Fail if max_block_size == 0 --- src/decompress.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.43.0