Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Unified Diff: third_party/crashpad/crashpad/util/posix/process_info_linux.cc

Issue 2825103002: Update Crashpad to b8aaa22905308cc400f880006a84dddac834bd6b (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/posix/process_info_linux.cc
diff --git a/third_party/crashpad/crashpad/util/posix/process_info_linux.cc b/third_party/crashpad/crashpad/util/posix/process_info_linux.cc
index 13b15a0dfc42fed070e51dabc7a223c5f8b64015..60b7b7f8c3a30b49a6177de11b426f2db4d1794f 100644
--- a/third_party/crashpad/crashpad/util/posix/process_info_linux.cc
+++ b/third_party/crashpad/crashpad/util/posix/process_info_linux.cc
@@ -209,12 +209,15 @@ bool ProcessInfo::Initialize(pid_t pid) {
LOG(ERROR) << "format error: multiple Groups lines";
return false;
}
- gid_t group;
- while (AdvancePastNumber(&line_c, &group)) {
- supplementary_groups_.insert(group);
- if (!AdvancePastPrefix(&line_c, " ")) {
- LOG(ERROR) << "format error: unrecognized Groups format";
- return false;
+ if (!AdvancePastPrefix(&line_c, " ")) {
+ // In Linux 4.10, even an empty Groups: line has a trailing space.
+ gid_t group;
+ while (AdvancePastNumber(&line_c, &group)) {
+ supplementary_groups_.insert(group);
+ if (!AdvancePastPrefix(&line_c, " ")) {
+ LOG(ERROR) << "format error: unrecognized Groups format";
+ return false;
+ }
}
}
have_groups = true;

Powered by Google App Engine
This is Rietveld 408576698