iptables: fix serializing multiple weekdays
authorJo-Philipp Wich <jo@mein.io>
Sun, 6 Dec 2020 13:56:26 +0000 (14:56 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 6 Dec 2020 13:57:07 +0000 (14:57 +0100)
Ref: https://bugs.openwrt.org/index.php?getfile=1053
Fixes: FS#1053
Fixes: 427bc12 ("iptables: fix serializing multiple weekdays")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
iptables.c

index e7e8b597c0dd948dbe327e100f1c54710b83bc12..9e8fa743c99f84222307128047d40d657916aa75 100644 (file)
@@ -1208,7 +1208,7 @@ fw3_ipt_rule_time(struct fw3_ipt_rule *r, struct fw3_time *time)
                                        rem--;
                                }
 
-                               p += snprintf(p, rem, "%u", i);
+                               len = snprintf(p, rem, "%u", i);
 
                                if (len < 0 || len >= rem)
                                        break;