diff options
Diffstat (limited to 'lib/sqfs/comp/xz.c')
-rw-r--r-- | lib/sqfs/comp/xz.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqfs/comp/xz.c b/lib/sqfs/comp/xz.c index 20e6445..662a49f 100644 --- a/lib/sqfs/comp/xz.c +++ b/lib/sqfs/comp/xz.c @@ -291,6 +291,12 @@ int xz_compressor_create(const sqfs_compressor_config_t *cfg, if (cfg->opt.xz.level > SQFS_XZ_MAX_LEVEL) return SQFS_ERROR_UNSUPPORTED; + if (cfg->opt.xz.dict_size < SQFS_XZ_MIN_DICT_SIZE) + return SQFS_ERROR_UNSUPPORTED; + + if (cfg->opt.xz.dict_size > SQFS_XZ_MAX_DICT_SIZE) + return SQFS_ERROR_UNSUPPORTED; + xz = calloc(1, sizeof(*xz)); base = (sqfs_compressor_t *)xz; if (xz == NULL) |