AIM file transfers to Pidgin are marked "Failed" in AOL Instant Messenger
Evan Schoenberg
evands at pidgin.im
Thu Aug 30 23:47:08 EDT 2007
On Aug 28, 2007, at 10:30 AM, Kyryll A Mirnenko aka Mirya wrote:
> 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
As I commented in your other thread about AIM file transfers, a Pidgin
Trac ticket with your findings would be great. Sounds like you're on
the road to a patch to fix this one -- be sure to attach it to the
ticket so we can review it and get it into libpurple. Definitely let
us know if you run into any problems!
Cheers,
Evan
More information about the Devel
mailing list