Re: [xslt] Release of libxslt-1.0.31

On Thu, Jul 10, 2003 at 03:17:13PM +0200, Peter Breitenlohner wrote:
> Attached please find two patches:
> 	patch-01-nanoxxx-ipv6-logic for libxml2-2.5.8
> and
> 	patch-01-typecast for libxslt-1.0.31

  Okay, applied both.

> 	A closer inspection reveales, that the existing code in both routines
> 	is most probably broken, possibly leading to
> 		(1) the use of an uninitialized socket
> 		(2) a memory leak

  I actually initialized the data to 0 to avoid unititialized access, but
your patch is a good addition (I also had renamed res to tmp since another
res existed in the function).

> NOTE 1:
> 	Wouldn't it be a good idea to use the same progam logic (and
> 	as far as possible the identical code) in both nanoftp and nanoftp.
> 	At the moment nanohttp tries all possible IP addresses, whereas
> 	nanoftp tries just the first one found and gives up if this fails.

  Why not. The problem is to extract the logic and have it compiled is 
ftp or http are compiled in, plus testing it :-)

> NOTE 2:
> 	If it were guaranteed that all implementations of freeaddrinfo can
> 	handle a NULL argument, then

   I would not make such assumption, the guard is fine.

> 	Assuming that xmlNsPtr is a specialization (subclass) of xmlNodePtr,
> 	and that node->type==XML_NAMESPACE_DECL indicates that the
> 	xmlNodePtr node is indeed such an xmlNsPtr, all one needs is a
> 	typecast.

   yes, this type of cast is present at lot of places in libxml2 code.



Daniel Veillard      | Red Hat Network  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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