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

Unified Diff: util/posix/process_info_mac.cc

Issue 813473002: DCHECK_LE for cr_ngroups vs arraysize(cr_groups) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/posix/process_info_mac.cc
diff --git a/util/posix/process_info_mac.cc b/util/posix/process_info_mac.cc
index a5e375380bd63f3d09ce0efe55cf17b58fbe2982..17d205a68e5bb110e23c8b03b2c1eb2da0df63f5 100644
--- a/util/posix/process_info_mac.cc
+++ b/util/posix/process_info_mac.cc
@@ -110,7 +110,7 @@ std::set<gid_t> ProcessInfo::SupplementaryGroups() const {
const short ngroups = kern_proc_info_.kp_eproc.e_ucred.cr_ngroups;
DCHECK_GE(ngroups, 0);
- DCHECK_LT(static_cast<size_t>(ngroups),
+ DCHECK_LE(static_cast<size_t>(ngroups),
arraysize(kern_proc_info_.kp_eproc.e_ucred.cr_groups));
const gid_t* groups = kern_proc_info_.kp_eproc.e_ucred.cr_groups;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698