lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev LYHandleMETA problem (was: lynx aborts with http://www.asusc


From: Leonid Pauzner
Subject: lynx-dev LYHandleMETA problem (was: lynx aborts with http://www.asuscom.com.tw/linux.html)
Date: Sat, 21 Nov 1998 14:11:14 +0300 (MSK)

> lynx aborts on the following url :

>       http://www.asuscom.com.tw/linux.html

this page have "big5" charset; for display charset other than big5
you cannot view the page properly and got a warning "Alert: big5" message
(yes, there is no check for 8bit characters in the document at this point).
Hope nothing dangerous here, but the comment is misguding (see below).

> because of the following in LYCharUtils.c/LYHandleMETA

>       /*
>        *  Hope it's a match, for now. - FM
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>        */
>       cp1 = &cp4[10];                         <<<<<<< How can we be sure there
>                                                       are 10 chars there ?
>                                                       in the testcase,
>                                                       cp4 is `big5'
>       while (*cp1 &&
>              isdigit((unsigned char)(*cp1)))
>           cp1++;
>       *cp1 = '\0';                            <<<<<<< Corrupts the heap.

> Philippe De Muyter - address@hidden


Fote's 2.7.2 code say:
======================
                UCSetTransParams(&me->T,
                                 me->inUCLYhndl, me->inUCI,
                                 me->outUCLYhndl, me->outUCI);
            /*
             *  Check for an iso-8859-# we don't know. - FM
             */
            } else if (!strncmp(cp4, "iso-8859-", 9) &&
                       isdigit(cp4[9]) &&
                       !strncmp(LYchar_set_names[current_char_set],
                                "Other ISO Latin", 15)) {
                /*
                 *  Hope it's a match, for now. - FM
                 */
                cp1 = &cp4[10];
                while (*cp1 &&
                       isdigit((unsigned char)(*cp1)))
                    cp1++;
                *cp1 = '\0';
                StrAllocCopy(me->node_anchor->charset, cp4);
                HTPassEightBitRaw = TRUE;
                HTAlert(me->node_anchor->charset);

            }
            FREE(cp3);

            if (TRACE && me->node_anchor->charset) {
                fprintf(stderr,
                        "LYHandleMETA: New charset: %s\n",
                        me->node_anchor->charset);
            }
        }

"Other ISO Latin" now obsolete and removed,
but the comment was not changed, sorry.
Case "else" corresponds to !CanTranslateFromTo(),
in your case UC-based display and CJK document,
so some kind of warning probably a good idea.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]