changeset 1671:e1dd3efa2965 draft

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>
author Roy Marples <roy@marples.name>
date Fri, 23 Mar 2012 07:38:39 +0000
parents 00b442b725ef
children 3fb226be6e68
files ipv6rs.c
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ipv6rs.c	Wed Mar 21 19:11:07 2012 +0000
+++ b/ipv6rs.c	Fri Mar 23 07:38:39 2012 +0000
@@ -478,8 +478,6 @@
 							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)