summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2016-01-19 17:45:04 +0100
committerDave Airlie <airlied@gmail.com>2016-01-29 14:03:27 +1000
commitbc358da30793396bfa2570730d9cb59bc659a8bc (patch)
tree8da1ab7c0bae94f7cefc4cd2871e1bc80b1da014 /src
parentfbee79ae2f2eeeb3ffcac1b737b48a05bb1d2d6b (diff)
decode: prevent handle 0 object creation
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/vrend_decode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vrend_decode.c b/src/vrend_decode.c
index 1d1b2a2..b3c7dea 100644
--- a/src/vrend_decode.c
+++ b/src/vrend_decode.c
@@ -624,6 +624,8 @@ static int vrend_decode_create_object(struct vrend_decode_ctx *ctx, int length)
if (length < 1)
return EINVAL;
+ if (handle == 0)
+ return EINVAL;
switch (obj_type){
case VIRGL_OBJECT_BLEND: