]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a potential error if we need to alter the sip server string.
authorRoy Marples <roy@marples.name>
Wed, 14 Dec 2011 09:57:56 +0000 (09:57 +0000)
committerRoy Marples <roy@marples.name>
Wed, 14 Dec 2011 09:57:56 +0000 (09:57 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 450e4e72fb7e39dc6178147b289f5d42fd8d88cf..fa8b02d8f21ee54b2ffb027459ee5a73621775f4 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1269,7 +1269,7 @@ print_option(char *s, ssize_t len, int type, int dl, const uint8_t *data)
                if ((tmp = decode_rfc3361(dl, data)) == NULL)
                        return -1;
                l = strlen(tmp);
-               print_string(s, len, l, (uint8_t *)tmp);
+               l = print_string(s, len, l - 1, (uint8_t *)tmp);
                free(tmp);
                return l;
        }