From 8b22babdf894e5aa98b2dbbe103f7e3856a71944 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Mar 2021 20:58:58 -0500 Subject: [PATCH] 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 --- src/tools/linux/md2core/minidump-2-core.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc index aade82c9..38d6d2bf 100644 --- a/src/tools/linux/md2core/minidump-2-core.cc +++ b/src/tools/linux/md2core/minidump-2-core.cc @@ -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);