From: Roy Marples Date: Fri, 23 Mar 2012 07:38:39 +0000 (+0000) Subject: Remove buffer overrun that leads to a segfault on ipv6 network. X-Git-Tag: v5.5.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65436fea3da4d3b8ad765b01495cdbb54d7cc456;p=thirdparty%2Fdhcpcd.git Remove buffer overrun that leads to a segfault on ipv6 network. strcpy copies the \0 of its src argument, therefore the following line is unneeded. Ironically, it can lead to a nasty segfault on a network that supports ipv6. In fact, it prevented me from access such a network using DHCP. Signed-off-by: Sidney Amani --- diff --git a/ipv6rs.c b/ipv6rs.c index 2bdb618b..8ebdbd89 100644 --- a/ipv6rs.c +++ b/ipv6rs.c @@ -478,8 +478,6 @@ ipv6rs_handledata(_unused void *arg) l + strlen(cbp) + 2); opt[l] = ' '; strcpy(opt + l + 1, cbp); - opt[l + strlen(cbp) + l + 1] = - '\0'; } else opt = xstrdup(cbp); if (lifetime > 0)