# HG changeset patch # User Ethan Blanton # Date 1079920458 0 # Node ID 791c05d1679d86ec081dc3c8f6caf47cee9511ff # Parent 6d0869404696754038cdc33e19e9e8463e7ccd12 [gaim-migrate @ 9215] This reportedly makes Yahoo auth work on architectures that aren't suck-endian. Thanks, Andrew Wellington. And while I'm thanking people, thanks to Matt Hyclak for helping me test this and many other patches... committer: Tailor Script diff -r 6d0869404696 -r 791c05d1679d COPYRIGHT --- a/COPYRIGHT Sun Mar 21 18:38:30 2004 +0000 +++ b/COPYRIGHT Mon Mar 22 01:54:18 2004 +0000 @@ -127,6 +127,7 @@ Bjoern Voigt Nathan Walp Eric Warmenhoven +Andrew Wellington Dan Willemsen Jason Willis Matt Wilson diff -r 6d0869404696 -r 791c05d1679d src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Sun Mar 21 18:38:30 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Mon Mar 22 01:54:18 2004 +0000 @@ -1303,7 +1303,7 @@ */ memcpy(&magic_key_char[0], comparison_src, 4); - memcpy(&magic_4, comparison_src, 4); + magic_4 = magic_key_char[0] | (magic_key_char[1]<<8) | (magic_key_char[2]<<16) | (magic_key_char[3]<<24); /* * Magic: Phase 4. Determine what function to use later by getting outside/inside @@ -1356,7 +1356,10 @@ updated_key = yahoo_auth_finalCountdown(magic_4, 0x60, y, x); updated_key = yahoo_auth_finalCountdown(updated_key, 0x60, y, x); - memcpy(&magic_key_char[0], &updated_key, 4); + magic_key_char[0] = updated_key & 0xff; + magic_key_char[1] = (updated_key >> 8) & 0xff; + magic_key_char[2] = (updated_key >> 16) & 0xff; + magic_key_char[3] = (updated_key >> 24) & 0xff; } /* Get password and crypt hashes as per usual.