2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

[cvtsudoers]: Prevent sudo from reading into undefined memory

This commit is contained in:
Sohom
2022-11-09 23:20:12 +05:30
parent 9f948224ac
commit 902271f441

View File

@@ -688,7 +688,7 @@ sudoers_parse_ldif(struct sudoers_parse_tree *parse_tree,
if (strncasecmp(attr, "cn=", 3) == 0) {
for (attr += 3; *attr != '\0'; attr++) {
/* Handle escaped ',' chars. */
if (*attr == '\\')
if (*attr == '\\' && attr[1] != '\0')
attr++;
if (*attr == ',') {
attr++;