From 30a45900113f98c177367507711f9c0cbd1010b2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 4 May 2012 15:09:51 +0200 Subject: [PATCH] fix buffer overflow in interface data handling --- interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1