lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV USEMAP problems (was Re: fotemods.zip update)


From: Foteos Macrides
Subject: Re: LYNX-DEV USEMAP problems (was Re: fotemods.zip update)
Date: Sun, 13 Apr 1997 20:57:54 -0500 (EST)

Klaus Weide <address@hidden> wrote:
>On Sat, 12 Apr 1997, Foteos Macrides wrote:
>> Klaus Weide <address@hidden> wrote:
>> >On Sat, 12 Apr 1997, Foteos Macrides wrote:
>> >> 1997-04-12
>> >> *  Fixed a typo under case HTML_IMG: of HTML_start_element() in
>> >>    HTML.c with the serious consequence that it can cause memory
>> >>    corruption if a BASE element is present in markup with an IMG
>> >>    or OBJECT element that has a USEMAP attribute.  This fix is
>> >>    needed in all versions of Lynx since v2.6. - FM
>> >
>> [...]
>>      if (map_href && strchr(map_href, '#')) {
>> 
>>          /*
>>           *  Check whether a base tag is in effect. - FM
>>           */
>>          if ((me->inBASE && *map_href == '#') &&
>>                                       ^^
>>              (temp = HTParse(map_href, me->base_href, PARSE_ALL)) &&
>>              *temp != '\0')
>> [...]
>> 
>>      The "==" indicated by the cartas is "!=" in v2.7 and v2.7.1,
>> and I presume all the devel code sets as well.
>> 
>>      Such a horrible consequence of such a small typo, sigh...
>
>I believe this wasn't a typo at all, but is completely consistent with all
>the other places where you try to accomodate the Fielding URL draft...
>(which says that URL references without an URL, i.e. only a fragment,
>refer to the current doc and should not cause a new retrieval action.)
>Of course you are the final authority over whether you made a typo :) :)
>but the code looks right to me with the "!=" and wrong after your
>"correction"...
>
>Below is a patch against 2.7.1.  The second difference section is the right
>solution IMHO.  The other two are about other problems I found when I tried
>to track down the problem.  
>
>Of course I may be totally wrong.  I've also been looking at this stuff
>way too long..
>
>Well maybe I should describe what the problem(s) was (were).  To
>reproduce, go to <URL: http://sol.slcc.edu/index2.html>.  Make a copy
>to a local file _via the print menu_ (so that a BASE tag gets
>inserted).  Quit Lynx, start Lynx again on that file.  follow one of
>the LYNXIMGMAP: links.  On the map page, note where those links point
>to (I think they point to the wrong places..).  
>Don't follow any of them, but go back with the PREV_DOC (left arrow)
>key.  The initial document now shows up as empty.

        OK, "typo" isn't the right word.  It was mindless cut and paste
of the checks associated with the fragments for positioning within the
document, i.e., without my thinking about the difference between those
and ones for seeking MAPs as deferred objects, as explained in today's
FOTEMODS entry.  I also was trying to figure out that blank page on
return from the LYNXIMAGEMAP: display, and because it went away for
my test files with that mod, and I wanted to go home, I assumed that
was fixed too, but you're right that problem was due to mis-handling
in HTML_free() when LYMapsOnly is set, as also explained in today's
FOTEMODS entry.  Note that you don't want to make the UPDATE_SYTLE
macro call contingent on whether me->text is not NULL (as in your
patch), but indeed create a blank document and execute the rest of
the HTML_free() code, or you'll have serious problems in cases such
as when bad comment syntax caused the entire body to be treated as
part of the comment but the calling stream doesn't know that, and
returns a status to indicate that the document was rendered and
loaded.

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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