--- a/libpurple/protocols/mxit/cipher.c Thu Aug 23 01:27:48 2012 -0400 +++ b/libpurple/protocols/mxit/cipher.c Fri Jan 25 02:22:38 2013 -0500 @@ -163,6 +163,10 @@ /* base64 decode the message */ raw_message = purple_base64_decode( message, &raw_len ); + /* AES-encrypted data is always blocks of 16 bytes */ + if ( ( raw_len == 0 ) || ( raw_len % 16 != 0 ) ) + return NULL; + /* build the AES key */ ExpandKey( (unsigned char*) transport_layer_key( session ), (unsigned char*) exkey );