summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2012-01-28 13:48:39 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2012-01-28 13:48:39 +0000
commitda53e06b414f54e9ef76149727724013a7ed9540 (patch)
tree6a62f9e52940559800a0064ff87359957797b2c0 /usr.sbin/tcpdump
parent28a88f4296759220a267c306cd7770c79515c37a (diff)
Use safeputs() for radius, some decodes are likely to have unprintable
characters. ok mikeb@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-radius.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-radius.c b/usr.sbin/tcpdump/print-radius.c
index 5579564e981..09249b772bf 100644
--- a/usr.sbin/tcpdump/print-radius.c
+++ b/usr.sbin/tcpdump/print-radius.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-radius.c,v 1.8 2006/05/23 21:57:15 stevesk Exp $ */
+/* $OpenBSD: print-radius.c,v 1.9 2012/01/28 13:48:38 sthen Exp $ */
/*
* Copyright (c) 1997 Thomas H. Ptacek. All rights reserved.
@@ -218,7 +218,8 @@ static void r_print_string(int code, int len, const u_char *data) {
memset(string, 0, 128);
memcpy(string, data, len);
- fprintf(stdout, " %s", string);
+ fprintf(stdout, " ");
+ safeputs(string);
}
static void r_print_hex(int code, int len, const u_char *data) {