mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 14:10:11 +01:00
CPU (Linux): don't access out-of-bound memory
This commit is contained in:
@@ -191,6 +191,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
ffStrbufAppendS(&cpu->vendor, pstart);
|
||||
}
|
||||
pstart = pend + 1;
|
||||
if (pstart >= buffer.chars + buffer.length)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,6 +224,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
}
|
||||
|
||||
pstart = pend + 1;
|
||||
if (pstart >= buffer.chars + buffer.length)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user