summaryrefslogtreecommitdiffstats
path: root/mm/frame_vector.c
diff options
context:
space:
mode:
authorJozef Balga <jozef.balga@gmail.com>2018-08-21 05:01:04 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-29 13:54:37 -0400
commit312f73b648626a0526a3aceebb0a3192aaba05ce (patch)
tree6b295d08d00ac14979d382868e6d25c8820eed55 /mm/frame_vector.c
parent4fbf51ee6e822ac28be28ff25883745131e8c4a3 (diff)
downloadlinux-312f73b648626a0526a3aceebb0a3192aaba05ce.tar.bz2
media: af9035: prevent buffer overflow on write
When less than 3 bytes are written to the device, memcpy is called with negative array size which leads to buffer overflow and kernel panic. This patch adds a condition and returns -EOPNOTSUPP instead. Fixes bugzilla issue 64871 [mchehab+samsung@kernel.org: fix a merge conflict and changed the condition to match the patch's comment, e. g. len == 3 could also be valid] Signed-off-by: Jozef Balga <jozef.balga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'mm/frame_vector.c')
0 files changed, 0 insertions, 0 deletions