diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-01-14 02:02:03 -0800 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2017-01-18 09:16:42 +0100 |
commit | d33705dab664019c1f602d8c5220288be1f49822 (patch) | |
tree | 041bb747b271dfca9ac1e51c4c09a9410e1ab2f7 /print-dhcp6.c | |
parent | 2817174698bcd5371ff7fbc9d50b5241dd0130bd (diff) | |
download | tcpdump-d33705dab664019c1f602d8c5220288be1f49822.tar.gz |
Use fn_printn() to print strings.
Don't just use %.*s - that's not robust in the presence of non-printable
characters in the string.
Diffstat (limited to 'print-dhcp6.c')
-rw-r--r-- | print-dhcp6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-dhcp6.c b/print-dhcp6.c index 1e249347..16f82542 100644 --- a/print-dhcp6.c +++ b/print-dhcp6.c @@ -731,7 +731,7 @@ dhcp6opt_print(netdissect_options *ndo, while (remain_len && *tp) { label_len = *tp++; if (label_len < remain_len - 1) { - ND_PRINT((ndo, "%.*s", label_len, tp)); + fn_printn(ndo, tp, label_len, NULL); tp += label_len; remain_len -= (label_len + 1); if(*tp) ND_PRINT((ndo, ".")); |