summaryrefslogtreecommitdiff
path: root/iptables.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-05-27 22:23:23 +0200
committerJo-Philipp Wich <jo@mein.io>2020-06-03 18:52:45 +0200
commitf62a52b105fdd3aa12cc073b2847140d5b64261f (patch)
tree56811195367b09b63f55508e9062b316d16a5ccb /iptables.h
parent23cc543f4f7ca636400707161e7e8355b6ecd856 (diff)
downloadfirewall3-f62a52b105fdd3aa12cc073b2847140d5b64261f.tar.gz
treewide: replace unsafe string functions
Replace sprintf(), strncpy() etc. with safer variants that perform bounds checking on the target buffer. Also rework unsafe `p += sprintf(p, ....)` code to properly handle error cases. Ref: http://lists.infradead.org/pipermail/openwrt-devel/2020-May/023363.html Suggested-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'iptables.h')
-rw-r--r--iptables.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables.h b/iptables.h
index 402baf2..ca39809 100644
--- a/iptables.h
+++ b/iptables.h
@@ -56,7 +56,7 @@ void fw3_ipt_delete_chain(struct fw3_ipt_handle *h, bool if_unused,
void fw3_ipt_delete_id_rules(struct fw3_ipt_handle *h, const char *chain);
void fw3_ipt_create_chain(struct fw3_ipt_handle *h, bool ignore_existing,
- const char *fmt, ...);
+ const char *chain);
void fw3_ipt_flush(struct fw3_ipt_handle *h);