]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
zstd cli : control maximum compression level
authorYann Collet <yann.collet.73@gmail.com>
Tue, 16 Feb 2016 15:33:48 +0000 (16:33 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Tue, 16 Feb 2016 15:33:48 +0000 (16:33 +0100)
programs/zstdcli.c

index 5fe1869a941debcac38513e9ac3458def06001f8..abe13013c3eafb845f73ee669d23d3f58f7d7771 100644 (file)
@@ -241,6 +241,8 @@ int main(int argCount, const char** argv)
                         argument++;
                     }
                     dictCLevel = cLevel;
+                    if (dictCLevel > ZSTD_maxCLevel())
+                        return badusage(programName);
                     continue;
                 }