From: Roy Marples Date: Wed, 14 Dec 2011 09:57:56 +0000 (+0000) Subject: Fix a potential error if we need to alter the sip server string. X-Git-Tag: v5.5.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1011354f32b7a03503b7f5a9f5e512773460c037;p=thirdparty%2Fdhcpcd.git Fix a potential error if we need to alter the sip server string. --- diff --git a/dhcp.c b/dhcp.c index 450e4e72..fa8b02d8 100644 --- 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; }