minidump-2-core: check platform_id for Linux

We have an enum for the OS, so check that instead.

Change-Id: I4bb38145553e3f5a2aa9baab330d588fef09a07e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2757679
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Mike Frysinger 2021-03-11 20:58:58 -05:00
parent 344b0ebf57
commit 8b22babdf8

View file

@ -626,8 +626,7 @@ ParseSystemInfo(const Options& options, CrashedProcess* crashinfo,
#else
#error "This code has not been ported to your platform yet"
#endif
if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(),
"Linux") &&
if (sysinfo->platform_id != MD_OS_LINUX &&
sysinfo->platform_id != MD_OS_NACL) {
fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n");
exit(1);