From 5161ab16583f5e619050d3bead0f49cd47dff66e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 4 Jul 2019 19:19:40 +0200 Subject: Fix: possible out of bounds read in libcompress.a Signed-off-by: David Oberhollenzer --- lib/comp/compressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/comp') 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]; -- cgit v1.2.3