changeset 1414:b2ac53d70ff1 draft dhcpcd-5.0

Don't null terminate gratuitously when handling quotes.
author Roy Marples <roy@marples.name>
date Wed, 09 Sep 2009 10:06:23 +0000
parents 01af6fe2e990
children 0a6d710d7042
files if-options.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/if-options.c	Wed Sep 02 20:19:19 2009 +0000
+++ b/if-options.c	Wed Sep 09 10:06:23 2009 +0000
@@ -258,8 +258,10 @@
 		} else
 			*sbuf++ = *str++;
 	}
-	if (punt_last)
+	if (punt_last) {
 		*--sbuf = '\0';
+		l--;
+	}
 	return l;
 }