diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-05-04 15:09:51 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-05-04 15:09:51 +0200 |
commit | 30a45900113f98c177367507711f9c0cbd1010b2 (patch) | |
tree | a7a86e0be532c65fabb60aeb401a6ec3a8d8b471 /interface.c | |
parent | bfe5db1ea8018aaa940dc6e991110fac62b85516 (diff) |
fix buffer overflow in interface data handling
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/interface.c b/interface.c index fbed513..78dcd83 100644 --- a/interface.c +++ b/interface.c @@ -118,7 +118,7 @@ interface_add_data(struct interface *iface, const struct blob_attr *data) if (!blobmsg_check_attr(data, true)) return UBUS_STATUS_INVALID_ARGUMENT; - n = calloc(1, sizeof(*data) + blob_pad_len(data)); + n = calloc(1, sizeof(*n) + blob_pad_len(data)); memcpy(n->data, data, blob_pad_len(data)); n->node.key = blobmsg_name(data); |