Mercurial > pidgin.yaz
changeset 26943:ccc217362818
counterpart for ad057b75 in the outgoing side
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Mon, 11 May 2009 00:17:40 +0000 |
parents | f924c19ad9c2 |
children | 4f36ec04181c |
files | libpurple/protocols/qq/qq_crypt.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq_crypt.c Sun May 10 23:13:31 2009 +0000 +++ b/libpurple/protocols/qq/qq_crypt.c Mon May 11 00:17:40 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]; + } } }