From 5e7e7622b43ef9c63c5c74ca3f5f33f4720193a4 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sat, 9 Nov 2024 14:06:16 -0800 Subject: [PATCH] Update to latest files from GTKWave --- vpi/fstapi.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vpi/fstapi.c b/vpi/fstapi.c index 7bc7fd821..70f1bb171 100644 --- a/vpi/fstapi.c +++ b/vpi/fstapi.c @@ -550,8 +550,9 @@ return(rc); static uint32_t fstReaderVarint32(FILE *f) { -int chk_len = 5; /* TALOS-2023-1783 */ -unsigned char buf[chk_len]; +const int chk_len_max = 5; /* TALOS-2023-1783 */ +int chk_len = chk_len_max; +unsigned char buf[chk_len_max]; unsigned char *mem = buf; uint32_t rc = 0; int ch; @@ -582,8 +583,9 @@ return(rc); static uint32_t fstReaderVarint32WithSkip(FILE *f, uint32_t *skiplen) { -int chk_len = 5; /* TALOS-2023-1783 */ -unsigned char buf[chk_len]; +const int chk_len_max = 5; /* TALOS-2023-1783 */ +int chk_len = chk_len_max; +unsigned char buf[chk_len_max]; unsigned char *mem = buf; uint32_t rc = 0; int ch; @@ -615,8 +617,9 @@ return(rc); static uint64_t fstReaderVarint64(FILE *f) { -int chk_len = 16; /* TALOS-2023-1783 */ -unsigned char buf[chk_len]; +const int chk_len_max = 16; /* TALOS-2023-1783 */ +int chk_len = chk_len_max; +unsigned char buf[chk_len_max]; unsigned char *mem = buf; uint64_t rc = 0; int ch;