summaryrefslogtreecommitdiff
path: root/lib/comp
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-04 19:19:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-04 19:20:26 +0200
commit5161ab16583f5e619050d3bead0f49cd47dff66e (patch)
treeba2a26c69dc230bcc757170ee40b86bb87780c95 /lib/comp
parent8a5f6693f2d1fea14f1941ee10910e3037fab506 (diff)
Fix: possible out of bounds read in libcompress.a
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/comp')
-rw-r--r--lib/comp/compressor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/comp/compressor.c b/lib/comp/compressor.c
index 506df46..cc04aa6 100644
--- a/lib/comp/compressor.c
+++ b/lib/comp/compressor.c
@@ -154,7 +154,7 @@ void compressor_print_available(void)
const char *compressor_name_from_id(E_SQFS_COMPRESSOR id)
{
- if (id < 0 || (size_t)id > sizeof(names) / sizeof(names[0]))
+ if (id < 0 || (size_t)id >= sizeof(names) / sizeof(names[0]))
return NULL;
return names[id];