* libmisc/xgetXXbyYY.c, libmisc/xgetpwnam.c, libmisc/xgetgrnam.c,
libmisc/xgetpwuid.c, libmisc/xgetgrgid.c, libmisc/xgetspnam.c: Do not limit the size of the buffer to hold the group or user structure. It used to be limited to 16k, which caused issues with groups having many users.
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
exit (13);
|
||||
}
|
||||
|
||||
do {
|
||||
while (true) {
|
||||
int status;
|
||||
LOOKUP_TYPE *resbuf = NULL;
|
||||
buffer = (char *)realloc (buffer, length);
|
||||
@@ -106,8 +106,14 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
length *= 4;
|
||||
} while (length < MAX_LENGTH);
|
||||
if (length <= ((size_t)-1 / 4)) {
|
||||
length *= 4;
|
||||
} else if (length == (size_t) -1) {
|
||||
break;
|
||||
} else {
|
||||
length = (size_t) -1;
|
||||
}
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
free(result);
|
||||
|
||||
Reference in New Issue
Block a user