On Tue, Jul 28, 2020 at 08:21:57AM -0400, Huang Guobin wrote:
> This code reads from the array before verifying that "c" is a valid
> index. Move test array offset code before use to fix it.
> 
> Fixes: 2da572c959dd ("lib: add software 842 compression/decompression")
> Signed-off-by: Huang Guobin <huangguob...@huawei.com>
> ---
>  lib/842/842_compress.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Did you check whether the out-of-bounds condition is even possible?

Cheers,
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply via email to