merge of '329646e4b1043d2214143630094cce25400439b9'

Mon, 11 May 2009 01:37:56 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Mon, 11 May 2009 01:37:56 +0000
changeset 27094
fff7e76af9f3
parent 27091
329646e4b104 (current diff)
parent 27093
feac35dbf3e5 (diff)
child 27095
b64a81acc299

merge of '329646e4b1043d2214143630094cce25400439b9'
and 'feac35dbf3e599490bb2d15d8a0254a948e3d4ee'

--- a/libpurple/protocols/qq/qq_crypt.c	Sun May 10 23:41:06 2009 +0000
+++ b/libpurple/protocols/qq/qq_crypt.c	Mon May 11 01:37:56 2009 +0000
@@ -163,9 +163,11 @@
 		c32_prev[0] = crypted32[0]; c32_prev[1] = crypted32[1];
 		
 		/* set next 64 bits want to crypt*/
-		crypted_ptr += 8;
-		memcpy(crypted32, crypted_ptr, sizeof(crypted32));
-		plain32[0] = crypted32[0] ^ c32_prev[0]; plain32[1] = crypted32[1] ^ c32_prev[1];
+		if (count64 > 0) {
+			crypted_ptr += 8;
+			memcpy(crypted32, crypted_ptr, sizeof(crypted32));
+			plain32[0] = crypted32[0] ^ c32_prev[0]; plain32[1] = crypted32[1] ^ c32_prev[1];
+		}
 	}
 }
 

mercurial