From: Yann Collet Date: Tue, 16 Feb 2016 15:33:48 +0000 (+0100) Subject: zstd cli : control maximum compression level X-Git-Tag: v0.5.1^2~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aa896adc6415bff61305c19c637ad1f5a01c4a6;p=thirdparty%2Fzstd.git zstd cli : control maximum compression level --- diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 5fe1869a9..abe13013c 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -241,6 +241,8 @@ int main(int argCount, const char** argv) argument++; } dictCLevel = cLevel; + if (dictCLevel > ZSTD_maxCLevel()) + return badusage(programName); continue; }