From 8086b5ca7f37dcccac5af9b4c874b15ec474e86e Mon Sep 17 00:00:00 2001 From: Cloudwalk Date: Fri, 24 Mar 2023 08:43:00 -0400 Subject: [PATCH] fs: Use unsigned short for extra field and file comment lengths --- fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs.c b/fs.c index 7c5ce33c..cae6d309 100644 --- a/fs.c +++ b/fs.c @@ -744,7 +744,7 @@ static int PK3_BuildFileList (pack_t *pack, const pk3_endOfCentralDir_t *eocd) // Skip the name, additionnal field, and comment // 1er uint16 : extra field length // 2eme uint16 : file comment length - count = namesize + BuffLittleShort (&ptr[30]) + BuffLittleShort (&ptr[32]); + count = namesize + (unsigned short)BuffLittleShort (&ptr[30]) + (unsigned short)BuffLittleShort (&ptr[32]); ptr += ZIP_CDIR_CHUNK_BASE_SIZE + count; remaining -= count; } -- 2.39.2