AIM file transfers to Pidgin are marked "Failed" in AOL Instant Messenger

Kyryll A Mirnenko aka Mirya mirya at
Tue Aug 28 10:30:00 EDT 2007

Seems like I've found the problematic code.
In libpurple/protocols/oscar/oft.c:

static void peer_oft_send(...) {
length = 192 + MAX(64, frame->name_length + 1);
byte_stream_putraw(&bs, frame->name, MAX(64, frame->name_length + 1));

Looks like
a) name_length is always >= 64, just 'cause of the way it's read from the 
incoming packet
b) if an actual filename length is <= 63 (so it fits 64 bytes with terminating 
null), then setting length to 192 + 64 makes AIM6 AOL client mark the 
transfer as successful
c) if the filename length is >= 64 than AIM6 makes it as "Failed" whatever 
modifications to the original formula I tried (MAX(64, frame->name_length + 
1) == frame->name_length + 1 there)
d) Miranda IM OSCAR plugin (noted in the previous message) fails to accept 
files with the filename longer than 64 at all
e) sniffing AIM6 to AIM6 traffic shows that it uses some upgraded version of 
file transfer exchange; the OftFrame has "OFT3" header and some extra fields 
in the middle (adding extra 8 bytes); the frame size field seems to stay 
where it was, and the filename is still the last bytes of the frame with 
extra null byte added; with that AIM6 accepts all filenames correctly 
regardless of its size
Regards, Mirya
ICQ #313898202

More information about the Devel mailing list