From 569e74a1f31efc29883fc74485f12a591412817d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 11 Mar 2003 22:51:52 +0000 Subject: When registering a string preference, if the value of the preference is NULL, convert it to a copy of a null string, otherwise replace it with a copy of the string, so that we know that the variable for the preference always points to a string that can be freed. That also obviates the need to worry about a null-pointer value for a preference variable when checking to see whether a preference has changed. When checking for a string preference not being set, check for an empty string, not a null pointer - the above code turns null pointers into pointers to empty strings, *and* the GUI code does (and always did!) the same. svn path=/trunk/; revision=7342 --- packet-radius.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet-radius.c') diff --git a/packet-radius.c b/packet-radius.c index 447c5b611f..7ada6431c5 100644 --- a/packet-radius.c +++ b/packet-radius.c @@ -5,7 +5,7 @@ * * RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869 * - * $Id: packet-radius.c,v 1.77 2003/02/13 03:05:14 guy Exp $ + * $Id: packet-radius.c,v 1.78 2003/03/11 22:51:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -2374,7 +2374,7 @@ rddecryptpass(gchar *dest,tvbuff_t *tvb,int offset,int length) const guint8 *pd; guchar c; - if (!shared_secret || !authenticator ) { + if (shared_secret[0] == '\0' || !authenticator ) { rdconvertbufftostr(dest,tvb,offset,length); return; } -- cgit v1.2.3