Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-2227 build: fix 'memory illegal access' errors
[fs/lustre-release.git]
/
lustre
/
utils
/
l_getidentity.c
diff --git
a/lustre/utils/l_getidentity.c
b/lustre/utils/l_getidentity.c
index
ff240eb
..
936f494
100644
(file)
--- a/
lustre/utils/l_getidentity.c
+++ b/
lustre/utils/l_getidentity.c
@@
-428,6
+428,10
@@
int main(int argc, char **argv)
maxgroups = sysconf(_SC_NGROUPS_MAX);
if (maxgroups > NGROUPS_MAX)
maxgroups = NGROUPS_MAX;
+ if (maxgroups == -1) {
+ rc = -EINVAL;
+ goto out;
+ }
size = offsetof(struct identity_downcall_data, idd_groups[maxgroups]);
data = malloc(size);