From 5e89953bf9ca04a21f1b7f28949c3000bf547436 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 17 Sep 2025 15:03:55 +0200 Subject: [PATCH 1/2] Fixed overflow --- src/common/gentype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/gentype.c b/src/common/gentype.c index 1600a7c2f..1067fcbc6 100644 --- a/src/common/gentype.c +++ b/src/common/gentype.c @@ -102,7 +102,10 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String) ** will be zero terminated and a pointer to the contents are returned. */ { - static const char HexTab[16] = "0123456789ABCDEF"; + static const char HexTab[16] = { + '0','1','2','3','4','5','6','7', + '8','9','A','B','C','D','E','F' + }; unsigned I; /* Convert Type into readable hex. String will have twice then length From 9601b11a9c12718084787da794b8ca994a15d2f1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 18 Sep 2025 11:10:41 +0200 Subject: [PATCH 2/2] inplicit length --- src/common/gentype.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/gentype.c b/src/common/gentype.c index 1067fcbc6..81480000a 100644 --- a/src/common/gentype.c +++ b/src/common/gentype.c @@ -102,10 +102,7 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String) ** will be zero terminated and a pointer to the contents are returned. */ { - static const char HexTab[16] = { - '0','1','2','3','4','5','6','7', - '8','9','A','B','C','D','E','F' - }; + static const char HexTab[] = "0123456789ABCDEF"; unsigned I; /* Convert Type into readable hex. String will have twice then length