changeset 31597:4c7ebb2cf4d1

msn: Avoid reading uninit memory. This can't happen at any of the existing call points.
author Paul Aurich <paul@darkrain42.org>
date Wed, 11 May 2011 05:00:06 +0000
parents 738467beb687
children b1a6535f99d9
files libpurple/protocols/msn/directconn.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Wed May 11 04:42:07 2011 +0000
+++ b/libpurple/protocols/msn/directconn.c	Wed May 11 05:00:06 2011 +0000
@@ -51,6 +51,9 @@
 		purple_cipher_context_destroy(context);
 	} else if (type == DC_NONCE_PLAIN) {
 		memcpy(digest, nonce, 16);
+	} else {
+		nonce_hash[0] = '\0';
+		g_return_if_reached();
 	}
 
 	g_sprintf(nonce_hash,