Commit 60f207a5 authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Daniel Vetter
Browse files

drm/atomic: fix out of bounds read in for_each_*_in_state helpers

for_each_*_in_state validate array index after
access to array elements, thus perform out of bounds read.

Fix this by validating index in the first place and read
array element iff validation was successful.

Fixes: df63b999

 ("drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros")
Signed-off-by: default avatarAndrey Ryabinin <a.ryabinin@samsung.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 955f3c33
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment