diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-05-22 16:09:59 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-05-22 16:12:46 +0200 |
commit | c3a5b984f6cec4014c1120ee900a53b452eb9e32 (patch) | |
tree | 7f71ef019ce18a44d84d098664466e3c33071e73 /zones.c | |
parent | c307c10ba8edb637c58db1449434fdd6b751f7f0 (diff) | |
download | firewall3-c3a5b984f6cec4014c1120ee900a53b452eb9e32.tar.gz |
Limit zone names to 14 bytes
Diffstat (limited to 'zones.c')
-rw-r--r-- | zones.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -189,6 +189,14 @@ fw3_load_zones(struct fw3_state *state, struct uci_package *p) continue; } + if (strlen(zone->name) > FW3_ZONE_MAXNAMELEN) + { + warn_elem(e, "must not have a name longer than %u characters", + FW3_ZONE_MAXNAMELEN); + fw3_free_zone(zone); + continue; + } + if (list_empty(&zone->networks) && list_empty(&zone->devices) && list_empty(&zone->subnets) && !zone->extra_src) { |