]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed ZSTD_format_e value validation
authorYann Collet <cyan@fb.com>
Wed, 27 Sep 2017 19:22:22 +0000 (12:22 -0700)
committerYann Collet <cyan@fb.com>
Wed, 27 Sep 2017 19:22:22 +0000 (12:22 -0700)
lib/compress/zstd_compress.c

index 7061d1f6f2f1425fc492361de0d47f539db2628a..8c9d4771cc6f172585665bf117c78fdfd5b3d819 100644 (file)
@@ -330,7 +330,7 @@ size_t ZSTD_CCtxParam_setParameter(
     switch(param)
     {
     case ZSTD_p_format :
-        if (value > (unsigned)ZSTD_f_zstd1)
+        if (value > (unsigned)ZSTD_f_zstd1_magicless)
             return ERROR(parameter_unsupported);
         params->format = (ZSTD_format_e)value;
         return 0;