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 <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
macos/master
Chia-I Wu 3 years ago
parent dbc1145c6b
commit dc171451c7
  1. 2
      src/venus/venus-protocol/vn_protocol_renderer.h
  2. 2
      src/venus/venus-protocol/vn_protocol_renderer_pipeline.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 * Copyright 2020 Google LLC

@ -96,7 +96,7 @@ vn_decode_VkPipelineShaderStageCreateInfo_self_temp(struct vn_cs_decoder *dec, V
if (!val->pName) return; if (!val->pName) return;
vn_decode_char_array(dec, (char *)val->pName, string_size); vn_decode_char_array(dec, (char *)val->pName, string_size);
} else { } else {
vn_decode_array_size(dec, strlen(val->pName) + 1); vn_decode_array_size_unchecked(dec);
val->pName = NULL; val->pName = NULL;
} }
if (vn_decode_simple_pointer(dec)) { if (vn_decode_simple_pointer(dec)) {

Loading…
Cancel
Save