projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b12381
)
drm/atomic: Refuse to add invalid objects to requests
author
Daniel Stone
<daniels@collabora.com>
Wed, 7 Mar 2018 12:41:12 +0000
(12:41 +0000)
committer
Daniel Stone
<daniels@collabora.com>
Wed, 7 Mar 2018 17:19:29 +0000
(17:19 +0000)
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>
xf86drmMode.c
patch
|
blob
|
history
diff --git
a/xf86drmMode.c
b/xf86drmMode.c
index
15957ff
..
bd59ef2
100644
(file)
--- a/
xf86drmMode.c
+++ b/
xf86drmMode.c
@@
-1313,6
+1313,9
@@
int drmModeAtomicAddProperty(drmModeAtomicReqPtr req,
if (!req)
return -EINVAL;
+ if (object_id == 0 || property_id == 0)
+ return -EINVAL;
+
if (req->cursor >= req->size_items) {
drmModeAtomicReqItemPtr new;