projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ubus: handle attribute access after NULL check in parse_subnets()
[project/firewall3.git]
/
ubus.c
diff --git
a/ubus.c
b/ubus.c
index
8e5e60e
..
0d83e0f
100644
(file)
--- a/
ubus.c
+++ b/
ubus.c
@@
-114,7
+114,9
@@
parse_subnets(struct list_head *head, enum fw3_family family,
if (!list)
return;
- blob_for_each_attr(cur, list, rem)
+ rem = blobmsg_data_len(list);
+
+ __blob_for_each_attr(cur, blobmsg_data(list), rem)
{
addr = parse_subnet(family, blobmsg_data(cur), blobmsg_data_len(cur));