Re: [xml] Two bugs in nanoftp.c in libxml2-2.4.10.



On Sat, Nov 17, 2001 at 06:44:58PM +0000, Prof Brian D Ripley wrote:
Two bugs in nanoftp.c in libxml2-2.4.10.

1) xmlNanoFTPFreeCtxt can be called quite early, before
ctxt->controlFd has been set.  In those circumstances, closesocket may
be called on a random integer, e.g. called on 0 and so closes stdin.
It needs to be set when a context is created.

   Sure, makes sense, applied !

2) ftp URLs of the form ftp://user foo/ and ftp://user:passwd foo/ are not
detected, let alone parsed, and it was a user trying one of these which led
me to find 1).  The patch below parses those forms: the rest of the code
accepts the setting of ctxt->user and ctxt->passwd, so this was all I
needed.

  Okay, applied. The nanoftp code should actually use the existing URI
handling code like xmlParseURI() for this, but I notice that your code handles
the possibility to add a password in the user field of the URI. I don't
think it's defined in RFC 2396, do you have a pointer where this extension
is 'standardized' ?

  Thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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