summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-03-23 07:38:39 +0000
committerRoy Marples <roy@marples.name>2012-03-23 07:38:39 +0000
commit65436fea3da4d3b8ad765b01495cdbb54d7cc456 (patch)
tree438ad673b7aef0216f134875963c834a3432ea0f
parentba0bc18bcbaaa4de645143fd8e809a07dda34306 (diff)
downloaddhcpcd-65436fea3da4d3b8ad765b01495cdbb54d7cc456.tar.xz
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 <seed95@gmail.com>
-rw-r--r--ipv6rs.c2
1 files changed, 0 insertions, 2 deletions
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)