lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.2dev.12.gz


From: Klaus Weide
Subject: Re: lynx-dev lynx2.8.2dev.12.gz
Date: Mon, 28 Dec 1998 06:29:25 -0600 (CST)

On Mon, 28 Dec 1998, Leonid Pauzner wrote:

> > * correct DOS/EMX logic in LYEdit.c which incremented 'filename' pointer 
> > when
> >   its length was greater than 1 rather than recopying the string, causing a
> >   core dump when 'filename' was freed (reported by LP, this applies to
> >   2.8.1rel.2) - TD
> 
> Another way will be the optimization with
> StrAllocCopy(filename, HTSYS_name(filename))
> in a single place near the top to reduce repeated translation calls.
> (Will check other files...)
> 
> and "FIXME" mean removing a leading slash before drive letter from HTParse,
> from trace log:
> 
> HTParse: result:/c:/lynx/dist28/d12/htdos
> Node `file://localhost/c:/lynx/dist28/d12/htdos' means path 
> `/c:/lynx/dist28/d12/htdos'
> HTDOS_name changed `/c:/lynx/dist28/d12/htdos' to `c:\lynx\dist28\d12\htdos'


While you are reviewing the code for DOS (etc.), please have a look
at this, near the beginning of is_url (LYUtils.c):

#if defined (DOSPATH) || defined (__EMX__) /* sorry! */
    if (strncmp(cp, "file:///", 8) && strlen(cp) == 19 &&
        cp[strlen(cp)-1] == ':')
        StrAllocCat(cp,"/");
#endif

That looks very very wrong, and is more likely to create memory
corruption than anything useful.  I suspect that nobody knows any
more what it was supposed to do, and that's why it is still there.


    Klaus

reply via email to

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