2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Change max user-ID and group-ID from INT_MAX to UINT_MAX.

This commit is contained in:
Todd C. Miller 2022-09-28 09:06:32 -06:00
parent 865d3cd0bb
commit 166e0e13bc

View File

@ -238,7 +238,7 @@ evlog_new(TimeSpec *submit_time, InfoMessage **info_msgs, size_t infolen,
}
if (strcmp(key, "rungid") == 0) {
if (type_matches(info, source, INFO_MESSAGE__VALUE_NUMVAL)) {
if (info->u.numval < 0 || info->u.numval > INT_MAX) {
if (info->u.numval < 0 || info->u.numval > UINT_MAX) {
errno = ERANGE;
sudo_warn(U_("%s: %s"), source, "rungid");
} else {
@ -259,7 +259,7 @@ evlog_new(TimeSpec *submit_time, InfoMessage **info_msgs, size_t infolen,
}
if (strcmp(key, "runuid") == 0) {
if (type_matches(info, source, INFO_MESSAGE__VALUE_NUMVAL)) {
if (info->u.numval < 0 || info->u.numval > INT_MAX) {
if (info->u.numval < 0 || info->u.numval > UINT_MAX) {
errno = ERANGE;
sudo_warn(U_("%s: %s"), source, "runuid");
} else {