aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ntlmssp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-11 22:51:52 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-11 22:51:52 +0000
commit569e74a1f31efc29883fc74485f12a591412817d (patch)
tree58d8b18bc83fc5053f8f79e3a99341a99dd2c925 /packet-ntlmssp.c
parent88959c985c2f35ac832ef6e2afa72e61ccc90878 (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. svn path=/trunk/; revision=7342
Diffstat (limited to 'packet-ntlmssp.c')
-rw-r--r--packet-ntlmssp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-ntlmssp.c b/packet-ntlmssp.c
index 3b83b9aa0b..996fb5e15b 100644
--- a/packet-ntlmssp.c
+++ b/packet-ntlmssp.c
@@ -2,7 +2,7 @@
* Routines for NTLM Secure Service Provider
* Devin Heitmueller <dheitmueller@netilla.com>
*
- * $Id: packet-ntlmssp.c,v 1.35 2003/03/04 20:52:33 guy Exp $
+ * $Id: packet-ntlmssp.c,v 1.36 2003/03/11 22:51:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -271,7 +271,7 @@ create_ntlmssp_v1_key(const char *nt_password, const guint8 *challenge,
memset(lm_password_upper, 0, sizeof(lm_password_upper));
/* Create a Lan Manager hash of the input password */
- if (nt_password) {
+ if (nt_password[0] != '\0') {
password_len = strlen(nt_password);
/* Truncate password if too long */
if (password_len > 16)