-
-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
The calculated size doesn't account for the space between sudoRole and the CN which results in the last character of the LDAP role cn being cutoff by snprintf.
sudo/plugins/sudoers/ldap_util.c
Lines 481 to 484 in 4fef09e
| size_t slen = sizeof("sudoRole") + strlen(priv->ldap_role); | |
| if ((source = sudo_rcstr_alloc(slen)) == NULL) | |
| goto oom; | |
| (void)snprintf(source, slen, "sudoRole %s", priv->ldap_role); |
A correction could look something like:
size_t slen = sizeof("sudoRole ") + strlen(priv->ldap_role);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels