From e094ca79f990652c6fe720cee908e16981ad54bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 3 Mar 2015 00:21:56 +0100 Subject: [PATCH] vrend: return EINVAL for unknown object type --- src/vrend_decode.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 761e0fa..beffdd8 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -640,6 +640,8 @@ static int vrend_decode_create_object(struct vrend_decode_ctx *ctx, int length) case VIRGL_OBJECT_STREAMOUT_TARGET: ret = vrend_decode_create_stream_output_target(ctx, handle, length); break; + default: + return EINVAL; } return ret; @@ -676,7 +678,10 @@ static int vrend_decode_bind_object(struct vrend_decode_ctx *ctx, uint16_t lengt case VIRGL_OBJECT_VERTEX_ELEMENTS: vrend_bind_vertex_elements_state(ctx->grctx, handle); break; + default: + return EINVAL; } + return 0; }