]> err.no Git - linux-2.6/commitdiff
[AUDIT] Avoid using %*.*s format strings.
authorPeter Martuccelli <peterm@redhat.com>
Fri, 29 Apr 2005 15:10:24 +0000 (16:10 +0100)
committer <dwmw2@shinybook.infradead.org> <>
Fri, 29 Apr 2005 15:10:24 +0000 (16:10 +0100)
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>
kernel/audit.c

index aa35422c0c428481f8a02f294635bd95e4919aee..42ce282728b68d15d1b47afa8530ab71b4169ee0 100644 (file)
@@ -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;