summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 23:51:18 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-28 00:06:07 +0200
commitb788f20d11ff0aef92c7400d8530c5961ea74541 (patch)
treeb8467bfce7841b8f6dd56470fdccd4bd9d848fa1 /lib
parent4fd98d314910c8c6b9bb27702d552cff1fab5c60 (diff)
Fix out of bounds check in lzo_compressor_create
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/sqfs/comp/lzo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/comp/lzo.c b/lib/sqfs/comp/lzo.c
index 498c250..46f9301 100644
--- a/lib/sqfs/comp/lzo.c
+++ b/lib/sqfs/comp/lzo.c
@@ -185,7 +185,7 @@ sqfs_compressor_t *lzo_compressor_create(const sqfs_compressor_config_t *cfg)
if (cfg->flags & ~SQFS_COMP_FLAG_GENERIC_ALL)
return NULL;
- if (cfg->opt.lzo.algorithm > LZO_NUM_ALGS ||
+ if (cfg->opt.lzo.algorithm >= LZO_NUM_ALGS ||
lzo_algs[cfg->opt.lzo.algorithm].compress == NULL) {
return NULL;
}