diff options
author | Gerald Combs <gerald@wireshark.org> | 2002-12-07 03:45:34 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2002-12-07 03:45:34 +0000 |
commit | 615a09e8615b34e2cf89180ce3def92ff51e6947 (patch) | |
tree | 1cfcfd63939ff14b19c1af60d8a68f26f314f67c /packet-tds.c | |
parent | 73dc273c7b718251cb5fd6aa40fa6d009eed01f6 (diff) |
Don't pass a null string pointer to proto_tree_add_text().
svn path=/trunk/; revision=6752
Diffstat (limited to 'packet-tds.c')
-rw-r--r-- | packet-tds.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-tds.c b/packet-tds.c index 85449c5216..17522dafa5 100644 --- a/packet-tds.c +++ b/packet-tds.c @@ -3,7 +3,7 @@ * Copyright 2000-2002, Brian Bruns <camber@ais.org> * Copyright 2002, Steve Langasek <vorlon@netexpress.net> * - * $Id: packet-tds.c,v 1.8 2002/12/03 08:36:48 guy Exp $ + * $Id: packet-tds.c,v 1.9 2002/12/07 03:45:34 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -459,10 +459,11 @@ dissect_tds7_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) len *= 2; val = get_unicode_or_ascii_string(tvb, &offset2, is_unicode, &len, TRUE, TRUE, &bc); - proto_tree_add_text(login_tree, tvb, offset2, len, - "%s: %s", - val_to_str(i, login_field_names, "Unknown"), - val); + if (val != NULL) + proto_tree_add_text(login_tree, tvb, offset2, len, + "%s: %s", + val_to_str(i, login_field_names, "Unknown"), + val); } } |