From ca637f057bfda46914819c71c1e9af67ca1fb2e4 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sat, 27 Sep 2025 17:36:13 +0200 Subject: [PATCH] Fix overflow --- tools/exetool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/exetool.c b/tools/exetool.c index 571d994..d034cab 100644 --- a/tools/exetool.c +++ b/tools/exetool.c @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) fread(&SubSystem, sizeof(unsigned short), 1, ExeFile); /* Seek back to the SubSystem field in the optional header */ - fseek(ExeFile, -sizeof(unsigned short), SEEK_CUR); + fseek(ExeFile, -(long)sizeof(unsigned short), SEEK_CUR); /* Write the new SubSystem value */ fwrite(&NewSubSystem->Identifier, sizeof(unsigned short), 1, ExeFile);