Skip to content

Commit 52d5252

Browse files
committed
auditctl: reject invalid key separators
1 parent 7c1fc7e commit 52d5252

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/auditctl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,8 +992,10 @@ static int process_key_option(const char *optarg, char *key,
992992
audit_msg(LOG_ERR, "key option exceeds size limit");
993993
return OPT_ERROR_NO_REPLY;
994994
}
995-
if (strchr(optarg, AUDIT_KEY_SEPARATOR))
995+
if (strchr(optarg, AUDIT_KEY_SEPARATOR)) {
996996
audit_msg(LOG_ERR, "key %s has illegal character", optarg);
997+
return OPT_ERROR_NO_REPLY;
998+
}
997999
if (key[0]) {
9981000
strcat(key, key_sep);
9991001
(*keylen)--;
@@ -1889,4 +1891,3 @@ static void get_reply(void)
18891891
}
18901892
}
18911893
}
1892-

0 commit comments

Comments
 (0)