https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb29a331692542cc51e2d9...
commit eb29a331692542cc51e2d9c6522ccb55786d761c Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sun Apr 11 02:24:19 2021 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Wed May 5 19:15:02 2021 +0200
[PEFIXUP] Section names are case-sensitive, so we can just use strncmp() instead of the non-standard strncasecmp() for names comparisons. (#3598) --- sdk/tools/pefixup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sdk/tools/pefixup.c b/sdk/tools/pefixup.c index 1bf9db9deeb..22c0f6eb6e4 100644 --- a/sdk/tools/pefixup.c +++ b/sdk/tools/pefixup.c @@ -142,24 +142,24 @@ static int driver_fixup(int mode, unsigned char *buffer, PIMAGE_NT_HEADERS nt_he Section->Characteristics &= ~IMAGE_SCN_CNT_INITIALIZED_DATA;
/* For some reason, .rsrc is made writable by windres */ - if (strncasecmp((char*)Section->Name, ".rsrc", 5) == 0) + if (strncmp((char*)Section->Name, ".rsrc", 5) == 0) { Section->Characteristics &= ~IMAGE_SCN_MEM_WRITE; continue; }
/* Known sections which can be discarded */ - if (strncasecmp((char*)Section->Name, "INIT", 4) == 0) + if (strncmp((char*)Section->Name, "INIT", 4) == 0) { Section->Characteristics |= IMAGE_SCN_MEM_DISCARDABLE; continue; }
/* Known sections which can be paged */ - if ((strncasecmp((char*)Section->Name, "PAGE", 4) == 0) - || (strncasecmp((char*)Section->Name, ".rsrc", 5) == 0) - || (strncasecmp((char*)Section->Name, ".edata", 6) == 0) - || (strncasecmp((char*)Section->Name, ".reloc", 6) == 0)) + if ((strncmp((char*)Section->Name, "PAGE", 4) == 0) + || (strncmp((char*)Section->Name, ".rsrc", 5) == 0) + || (strncmp((char*)Section->Name, ".edata", 6) == 0) + || (strncmp((char*)Section->Name, ".reloc", 6) == 0)) { continue; }