From: Peter Martuccelli Date: Fri, 29 Apr 2005 15:10:24 +0000 (+0100) Subject: [AUDIT] Avoid using %*.*s format strings. X-Git-Tag: v2.6.12-rc4~145 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7fcb0ee74ef4cfdea02befacb55945c93641e44;p=linux-2.6 [AUDIT] Avoid using %*.*s format strings. They don't seem to work correctly (investigation ongoing), but we don't actually need to do it anyway. Patch from Peter Martuccelli Signed-off-by: David Woodhouse --- diff --git a/kernel/audit.c b/kernel/audit.c index aa35422c0c..42ce282728 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -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;