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: