Skip to content

Commit 73339a6

Browse files
committed
Undo commit 96ab07a (multi-keys)
This patch was in response to fuzzing finding problems in multiple keys per record. Code review shows that this might not be working right. It can appear to truncate keys, but it doesn't in real tests. Revert the fix and see if this is found again by fuzzing in the future.
1 parent 3e59b40 commit 73339a6

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

auparse/interpret.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3634,24 +3634,8 @@ char *auparse_do_interpretation(auparse_state_t *au, int type, const idata *id,
36343634
// Its here just in the off chance someone
36353635
// actually put a control character in a key.
36363636
char *dest = malloc(len + 1 + (3*cnt));
3637-
if (dest) {
3638-
// Because need_escaping was called
3639-
// terminated, we need to do the same
3640-
// incase there's a Ctl-A in the key.
3641-
// This is likely fuzzer induced.
3642-
char tmp;
3643-
sep = strchr(mutable,
3644-
AUDIT_KEY_SEPARATOR);
3645-
if (sep) {
3646-
tmp = *sep;
3647-
*sep = 0;
3648-
key_escape(mutable, dest,
3649-
escape_mode);
3650-
*sep = tmp;
3651-
} else
3652-
key_escape(mutable, dest,
3653-
escape_mode);
3654-
}
3637+
if (dest)
3638+
key_escape(mutable, dest, escape_mode);
36553639
free(mutable);
36563640
free((void *)out);
36573641
out = dest;

0 commit comments

Comments
 (0)