From: Roy Marples Date: Wed, 9 Sep 2009 10:06:23 +0000 (+0000) Subject: Don't null terminate gratuitously when handling quotes. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72e82f327f345ecc17209270e932ac0578fcfd6a;p=thirdparty%2Fdhcpcd.git Don't null terminate gratuitously when handling quotes. --- diff --git a/if-options.c b/if-options.c index 959fcba8..53bb1a18 100644 --- a/if-options.c +++ b/if-options.c @@ -258,8 +258,10 @@ parse_string_hwaddr(char *sbuf, ssize_t slen, const char *str, int clid) } else *sbuf++ = *str++; } - if (punt_last) + if (punt_last) { *--sbuf = '\0'; + l--; + } return l; }