Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist fix variable length stack allocatio...



details:   https://anonhg.NetBSD.org/src/rev/0ad6deb305a9
branches:  trunk
changeset: 345772:0ad6deb305a9
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jun 08 01:33:08 2016 +0000

description:
fix variable length stack allocation from upstream

diffstat:

 external/bsd/dhcpcd/dist/dhcp-common.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r e49a1fd969e9 -r 0ad6deb305a9 external/bsd/dhcpcd/dist/dhcp-common.c
--- a/external/bsd/dhcpcd/dist/dhcp-common.c    Wed Jun 08 01:19:05 2016 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp-common.c    Wed Jun 08 01:33:08 2016 +0000
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp-common.c,v 1.16 2016/05/09 10:15:59 roy Exp $");
+ __RCSID("$NetBSD: dhcp-common.c,v 1.17 2016/06/08 01:33:08 christos Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -833,7 +833,7 @@
 dhcp_set_leasefile(char *leasefile, size_t len, int family,
     const struct interface *ifp)
 {
-       char ssid[len];
+       char ssid[1 + (IF_SSIDLEN * 4) + 1];
 
        if (ifp->name[0] == '\0') {
                strlcpy(leasefile, ifp->ctx->pidfile, len);



Home | Main Index | Thread Index | Old Index