From d25d59f9e817d69df89bccf69bb8a1c810ec2e31 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 25 Mar 2020 20:32:43 -0700 Subject: [PATCH] vrend: reject cmd submission for ctx 0 Signed-off-by: Chia-I Wu Reviewed-by: Gurchetan Singh --- src/vrend_decode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 844a53b..5b79670 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -1475,6 +1475,9 @@ int vrend_decode_block(uint32_t ctx_id, uint32_t *block, int ndw) bool bret; int ret; + if (ctx_id == 0) + return EINVAL; + gdctx = vrend_decode_ctx_lookup(ctx_id); if (!gdctx) return EINVAL;