# HG changeset patch # User Ka-Hing Cheung # Date 1242005876 0 # Node ID 4f36ec04181c37eb746eff2e61e19317b6179009 # Parent 0402ec1872dc0a8ebbea57d4fd52ee10b2a79a70# Parent ccc217362818c1b650c71696bbe4bebf3009e6fc merge of '2b7afd5f3a168b013e5d3cd69999ffb6e0ee95a6' and '2c9a1153bc1694e9656752a73526bd6b7461265b' diff -r 0402ec1872dc -r 4f36ec04181c libpurple/protocols/qq/qq_crypt.c --- 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]; + } } }