mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 18:24:24 +00:00
[PEFIXUP] Section names are case-sensitive, so we can just use strncmp() instead of the non-standard strncasecmp() for names comparisons. (#3598)
This commit is contained in:
parent
ea26767353
commit
eb29a33169
|
@ -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;
|
Section->Characteristics &= ~IMAGE_SCN_CNT_INITIALIZED_DATA;
|
||||||
|
|
||||||
/* For some reason, .rsrc is made writable by windres */
|
/* 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;
|
Section->Characteristics &= ~IMAGE_SCN_MEM_WRITE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Known sections which can be discarded */
|
/* 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;
|
Section->Characteristics |= IMAGE_SCN_MEM_DISCARDABLE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Known sections which can be paged */
|
/* Known sections which can be paged */
|
||||||
if ((strncasecmp((char*)Section->Name, "PAGE", 4) == 0)
|
if ((strncmp((char*)Section->Name, "PAGE", 4) == 0)
|
||||||
|| (strncasecmp((char*)Section->Name, ".rsrc", 5) == 0)
|
|| (strncmp((char*)Section->Name, ".rsrc", 5) == 0)
|
||||||
|| (strncasecmp((char*)Section->Name, ".edata", 6) == 0)
|
|| (strncmp((char*)Section->Name, ".edata", 6) == 0)
|
||||||
|| (strncasecmp((char*)Section->Name, ".reloc", 6) == 0))
|
|| (strncmp((char*)Section->Name, ".reloc", 6) == 0))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue