In the Linux kernel, the following vulnerability has been resolved: 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.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024111931-CVE-2024-53061-a7a1@gregkh/T