decode: prevent handle 0 object creation

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent fbee79ae2f
commit bc358da307
  1. 2
      src/vrend_decode.c

@ -624,6 +624,8 @@ static int vrend_decode_create_object(struct vrend_decode_ctx *ctx, int length)
if (length < 1) if (length < 1)
return EINVAL; return EINVAL;
if (handle == 0)
return EINVAL;
switch (obj_type){ switch (obj_type){
case VIRGL_OBJECT_BLEND: case VIRGL_OBJECT_BLEND:

Loading…
Cancel
Save