Commit 14a22762 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: s5p-jpeg: prevent buffer overflows



The current logic allows word to be less than 2. If this happens,
there will be buffer overflows, as reported by smatch. Add extra
checks to prevent it.

While here, remove an unused word = 0 assignment.

Fixes: 6c96dbbc ("[media] s5p-jpeg: add support for 5433")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 458ea1c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment