aboutsummaryrefslogtreecommitdiffstats
path: root/packet-radius.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-07-09 23:17:05 +0000
committerGuy Harris <guy@alum.mit.edu>2004-07-09 23:17:05 +0000
commit7661a992b6e6fa0cd50ae0b9f968a131f299b3cb (patch)
tree2a1ee38f14504ad2092c0d754f48db7845689fb9 /packet-radius.c
parentfe1b0f99c4015d93f71fe35a549da186d5311f2e (diff)
Move the redefinition of "isprint()" to be used by dissectors when
generating strings to put into the printable representation of protocol tree items into an "isprint.h" header, and include it in some additional dissectors. Add bounds checking to one place in the DICOM dissector. svn path=/trunk/; revision=11356
Diffstat (limited to 'packet-radius.c')
-rw-r--r--packet-radius.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/packet-radius.c b/packet-radius.c
index f4b0ea0f68..651da08218 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -6,7 +6,7 @@
*
* RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
*
- * $Id: packet-radius.c,v 1.104 2004/05/29 04:41:25 guy Exp $
+ * $Id: packet-radius.c,v 1.105 2004/07/09 23:17:04 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -37,6 +37,9 @@
#include <ctype.h>
#include <glib.h>
#include <time.h>
+
+#include "isprint.h"
+
#include <epan/packet.h>
#include <epan/resolv.h>
@@ -2747,23 +2750,6 @@ find_radius_attr_info(guint32 attr_type, const radius_attr_info *table)
return(NULL);
}
-#if GLIB_MAJOR_VERSION >= 2
-/*
- * XXX - "isprint()" can return "true" for non-ASCII characters, but
- * those don't work with GTK+ 1.3 or later, as they take UTF-8 strings
- * as input. Until we fix up Ethereal to properly handle non-ASCII
- * characters in all output (both GUI displays and text printouts)
- * in those versions of GTK+, we work around the problem by escaping
- * all characters that aren't printable ASCII.
- *
- * We don't know what version of GTK+ we're using, as dissectors don't
- * use any GTK+ stuff; we use GLib as a proxy for that, with GLib 2.x
- * implying GTK+ 1.3 or later (we don't support GLib 1.3[.x]).
- */
-#undef isprint
-#define isprint(c) (c >= 0x20 && c < 0x7f)
-#endif
-
static void
rdconvertbufftostr(gchar *dest, tvbuff_t *tvb, int offset, int length)
{