Skip to content

Commit

Permalink
[AUDIT] Avoid using %*.*s format strings.
Browse files Browse the repository at this point in the history
They don't seem to work correctly (investigation ongoing), but we don't
actually need to do it anyway.

Patch from Peter Martuccelli <peterm@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Peter Martuccelli authored and Unknown committed Apr 29, 2005
1 parent d812ddb commit c7fcb0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ static inline int audit_log_drain(struct audit_buffer *ab)
if (!audit_pid) { /* No daemon */
int offset = ab->nlh ? NLMSG_SPACE(0) : 0;
int len = skb->len - offset;
printk(KERN_ERR "%*.*s\n",
len, len, skb->data + offset);
skb->data[offset + len] = '\0';
printk(KERN_ERR "%s\n", skb->data + offset);
}
kfree_skb(skb);
ab->nlh = NULL;
Expand Down

0 comments on commit c7fcb0e

Please sign in to comment.