]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't null terminate gratuitously when handling quotes.
authorRoy Marples <roy@marples.name>
Wed, 9 Sep 2009 10:06:23 +0000 (10:06 +0000)
committerRoy Marples <roy@marples.name>
Wed, 9 Sep 2009 10:06:23 +0000 (10:06 +0000)
if-options.c

index 959fcba84cf3629c328c9275946b239ed9c59743..53bb1a18261ffb8aef0db7b76ef636e806f09a51 100644 (file)
@@ -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;
 }