Fix poor parsing of proc/maps file. Closes #3540

This commit is contained in:
baldurk
2025-02-13 13:57:22 +00:00
parent b02dbdc1b5
commit eeec813f70
+7 -1
View File
@@ -402,7 +402,13 @@ bool StopChildAtMain(pid_t childPid, bool *exitWithNoExec)
char line[512] = {0};
if(fgets(line, 511, maps))
{
if(strstr(line, "r-xp"))
char *sp = strchr(line, ' ');
if(sp == NULL)
continue;
sp++;
if(!strncmp(sp, "r-xp ", 4))
{
RDCCOMPILE_ASSERT(sizeof(long) == sizeof(void *), "Expected long to be pointer sized");
int pathOffset = 0;