drm/atomic: Refuse to add invalid objects to requests
Object and property IDs cannot be zero. Prevent them from being added to the request stream at all, rather than breaking at commit time. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>main
parent
7b12381723
commit
45eee3fd44
|
@ -1313,6 +1313,9 @@ int drmModeAtomicAddProperty(drmModeAtomicReqPtr req,
|
||||||
if (!req)
|
if (!req)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (object_id == 0 || property_id == 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (req->cursor >= req->size_items) {
|
if (req->cursor >= req->size_items) {
|
||||||
drmModeAtomicReqItemPtr new;
|
drmModeAtomicReqItemPtr new;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue