aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-samr.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-11 22:51:52 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-11 22:51:52 +0000
commit1e212e098dcfb2bed84f63625529c9dc2c7abab2 (patch)
tree58d8b18bc83fc5053f8f79e3a99341a99dd2c925 /packet-dcerpc-samr.c
parentc188788e2bbc07cad42e8f0c30701e113498c51b (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7342 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-dcerpc-samr.c')
-rw-r--r--packet-dcerpc-samr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-dcerpc-samr.c b/packet-dcerpc-samr.c
index 685a311989..877b4c726f 100644
--- a/packet-dcerpc-samr.c
+++ b/packet-dcerpc-samr.c
@@ -3,7 +3,7 @@
* Copyright 2001,2003 Tim Potter <tpot@samba.org>
* 2002 Added all command dissectors Ronnie Sahlberg
*
- * $Id: packet-dcerpc-samr.c,v 1.81 2003/02/25 02:03:11 tpot Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.82 2003/03/11 22:51:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1762,7 +1762,7 @@ samr_dissect_NT_PASSCHANGE_BLOCK(tvbuff_t *tvb, int offset,
proto_tree_add_text(tree, tvb, offset, NT_BLOCK_SIZE,
"Encrypted NT Password Block");
- if (nt_password != NULL) {
+ if (nt_password[0] != '\0') {
/* We have an NT password, so we can decrypt the password
change block. */