From 7661a992b6e6fa0cd50ae0b9f968a131f299b3cb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 9 Jul 2004 23:17:05 +0000 Subject: 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 --- packet-radius.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'packet-radius.c') 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 @@ -37,6 +37,9 @@ #include #include #include + +#include "isprint.h" + #include #include @@ -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) { -- cgit v1.2.3