[JDEV] A Bug of MSN-transport 1.2.1 : About Local Font Names

Francisco Obarrio jabber at fibertel.com.ar
Mon Apr 28 15:49:33 CDT 2003


i dont know if it's the same bug.. but im using jadc2s and when a user logs
to my jabberd server and has "strange" characters (maybe like korean,
chineese) the servers goes down ...

i will try to change to your code.

Thanks.

Fran





-----Mensaje original-----
De: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org]En nombre de
Kevin Jae-jun Kang
Enviado el: domingo, 27 de abril de 2003 23:54
Para: jdev at jabber.org
Asunto: [JDEV] A Bug of MSN-transport 1.2.1 : About Local Font Names


Hello, there.

I've been running msn-t 1.2.1 on Redhat7-derived Linux.

I found a bug in msn-t 1.2.1 about local font names:
With msn-t, I can chat with MSN messenger users using a Jabber client.
However, in case the MSN messenger user sets the font name in localized
characters (such as, Korean, Chinese..) the MSN-t cannot doesn't properly
deliver the message from MSN user to me.
English font names are Ok, but the local font names always cause problems.

Looking into the code,
I found a trivial bug in the function mt_decode() in utils.c
As I showed in the following, we need to change the contant '2' to '1' in
the if condition statement.
Otherwise, this code will always miss the last encoded character.

Current:
char *mt_decode(pool p, char *s)
{
    spool sp = spool_new(p);
    int l, i = 0;

    l = strlen(s);
    while (i < l)
    {
        int c = s[i++];

        if (c == '%' && (i + 2 < l))
        {
...
        }
...
    }

    return spool_print(sp);
}


Corrected:
char *mt_decode(pool p, char *s)
{

...
    while (i < l)
    {
        int c = s[i++];

        if (c == '%' && (i + 1 < l))
        {
...
        }
...
}

Hope this will help people like me who use jabberd in Far-East Asian region.


Best regards,

June J. Kang
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev




More information about the JDev mailing list