From 6aa896adc6415bff61305c19c637ad1f5a01c4a6 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 16 Feb 2016 16:33:48 +0100 Subject: [PATCH] zstd cli : control maximum compression level --- programs/zstdcli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 5fe1869a..abe13013 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; }