summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-02-25 14:11:35 +0000
committerRoy Marples <roy@marples.name>2014-02-25 14:11:35 +0000
commit1989cad379da2048df870f365903b8f4226cd5c8 (patch)
treeae6d590f3f1f52fd8033354c1e04a54fca3dcb39 /dhcpcd.c
parentdb67f1e285b2972e43552e63522bd9efbefc822a (diff)
downloaddhcpcd-1989cad379da2048df870f365903b8f4226cd5c8.tar.xz
Don't use a variable length buffer
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 128726c0..a16cc9d3 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -757,7 +757,7 @@ handle_hwaddr(struct dhcpcd_ctx *ctx, const char *ifname,
const uint8_t *hwaddr, size_t hwlen)
{
struct interface *ifp;
- char buf[hwlen * 3];
+ char buf[sizeof(ifp->hwaddr) * 3];
ifp = find_interface(ctx, ifname);
if (ifp == NULL)