]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_comment: output quotes must be escaped in
authorJan Engelhardt <jengelh@medozas.de>
Thu, 19 Mar 2009 10:57:10 +0000 (11:57 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 19 Mar 2009 10:58:18 +0000 (11:58 +0100)
Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519584
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_comment.c

index 0ff0144d29ec4bfa92072845f8778aa8ddd989a2..67d7f998b0fe0e4e20d8fd66c80815162b1673a4 100644 (file)
@@ -84,7 +84,8 @@ comment_save(const void *ip, const struct xt_entry_match *match)
        struct xt_comment_info *commentinfo = (struct xt_comment_info *)match->data;
 
        commentinfo->comment[XT_MAX_COMMENT_LEN-1] = '\0';
-       printf("--comment \"%s\" ", commentinfo->comment);
+       printf("--comment ");
+       xtables_save_string((const char *)commentinfo->comment);
 }
 
 static struct xtables_match comment_match = {