projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfe5db1
)
fix buffer overflow in interface data handling
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 4 May 2012 13:09:51 +0000
(15:09 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 4 May 2012 13:09:51 +0000
(15:09 +0200)
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index fbed513856c59b2924564a74ff6918d10428cd06..78dcd836583c5899db704ff34f897f85b6eaefdb 100644
(file)
--- 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);