drm: Branch 'master'

[email protected] (Daniel Stone) Wed, 7 Mar 2018 17:19:38 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 xf86drmMode.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 45eee3fd44f4fa253cd4d5c03f48d4a6899f899f
Author: Daniel Stone <[email protected]>
Date:   Wed Mar 7 12:41:12 2018 +0000

    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 <[email protected]>
    Reviewed-by: Daniel Vetter <[email protected]>

diff --git a/xf86drmMode.c b/xf86drmMode.c
index 15957ffc..bd59ef25 100644
--- 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;
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--