From dc171451c7a79e84e8bdb68cc18e8e87cc2e1c0f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 20 Aug 2021 10:58:50 -0700 Subject: [PATCH] vkr: do not validate string sizes when they are 0 There is no need to validate string sizes as they are only encoded in one place, unlike with other dynamic arrays. We don't validate string sizes when they are non-zero already. This fixes the decoder to not validate when they are 0. Signed-off-by: Chia-I Wu Reviewed-by: Ryan Neph Reviewed-by: Yiwei Zhang --- src/venus/venus-protocol/vn_protocol_renderer.h | 2 +- src/venus/venus-protocol/vn_protocol_renderer_pipeline.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/venus/venus-protocol/vn_protocol_renderer.h b/src/venus/venus-protocol/vn_protocol_renderer.h index d334d25..603977e 100644 --- a/src/venus/venus-protocol/vn_protocol_renderer.h +++ b/src/venus/venus-protocol/vn_protocol_renderer.h @@ -1,4 +1,4 @@ -/* This file is generated by venus-protocol git-ab2774c8. */ +/* This file is generated by venus-protocol git-97ac37e8. */ /* * Copyright 2020 Google LLC diff --git a/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h b/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h index deed2bd..4946f0b 100644 --- a/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h +++ b/src/venus/venus-protocol/vn_protocol_renderer_pipeline.h @@ -96,7 +96,7 @@ vn_decode_VkPipelineShaderStageCreateInfo_self_temp(struct vn_cs_decoder *dec, V if (!val->pName) return; vn_decode_char_array(dec, (char *)val->pName, string_size); } else { - vn_decode_array_size(dec, strlen(val->pName) + 1); + vn_decode_array_size_unchecked(dec); val->pName = NULL; } if (vn_decode_simple_pointer(dec)) {