From 70a638bcf5bc493b4b1b2356a9ac14b7a4e0bb79 Mon Sep 17 00:00:00 2001 From: refis Date: Thu, 19 Sep 2024 07:07:04 +0900 Subject: [PATCH] Patch 1555 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・Patch1554のエラーを修正(common/grfio.c) --- CHANGELOG.md | 5 +++++ src/common/grfio.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 445fadb4..1f7be82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +---------------------------------------- +//1555 [2024/09/19] by refis + +・Patch1554のエラーを修正(common/grfio.c) + ---------------------------------------- //1554 [2024/09/18] by refis diff --git a/src/common/grfio.c b/src/common/grfio.c index 94349074..6d5a37f1 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -766,7 +766,7 @@ static int grfio_entryread(const char *gfname,int gentry) diff = 4; case 0x0200: //****** Grf version 02xx ****** { - unsigned char eheader[8+diff]; + unsigned char eheader[12]; unsigned char *rBuf; unsigned int rSize; unsigned long eSize; @@ -778,7 +778,7 @@ static int grfio_entryread(const char *gfname,int gentry) uint32 uncompressedLength; // 4 unsigned char body[compressedLength]; // 8 };*/ - fread(eheader, 1, sizeof(eheader), fp); + fread(eheader, 1, (size_t)(8+diff), fp); rSize = getlong(eheader + diff); // Read Size eSize = getlong(eheader + 4 + diff); // Extend Size