diff options
author | Ka-Hing Cheung <khc@pidgin.im> | 2009-05-11 00:17:40 +0000 |
---|---|---|
committer | Ka-Hing Cheung <khc@pidgin.im> | 2009-05-11 00:17:40 +0000 |
commit | 4b9e7c4307a48ff12dea9ba4658e956f9266d22e (patch) | |
tree | 2719e5f877fb4067093fb11f8e8c3a07395bf5d8 | |
parent | f22a4bdad9be311563b239b2e5327d83ae555757 (diff) | |
download | pidgin-4b9e7c4307a48ff12dea9ba4658e956f9266d22e.tar.gz |
counterpart for ad057b75 in the outgoing side
-rw-r--r-- | libpurple/protocols/qq/qq_crypt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpurple/protocols/qq/qq_crypt.c b/libpurple/protocols/qq/qq_crypt.c index f648e02b6b..c6a0914ef4 100644 --- a/libpurple/protocols/qq/qq_crypt.c +++ b/libpurple/protocols/qq/qq_crypt.c @@ -163,9 +163,11 @@ static inline void encrypt_out(guint8 *crypted, const gint crypted_len, const gu 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]; + } } } |