diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-05-27 22:23:23 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-06-03 18:52:45 +0200 |
commit | f62a52b105fdd3aa12cc073b2847140d5b64261f (patch) | |
tree | 56811195367b09b63f55508e9062b316d16a5ccb /iptables.h | |
parent | 23cc543f4f7ca636400707161e7e8355b6ecd856 (diff) | |
download | firewall3-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |