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

Re: [xml] libxml2 Solaris issue



On Mon, Nov 26, 2007 at 10:29:31AM +0100, Petr Sumbera wrote:
> Hi Daniel,
> 
> I'm not getting answer for this. Shall I file bug in bug database?

  Dohh, it got piled up in my unread mail for a long time. I applied
a patch similar to yours (but without the unecessary cost of strlen())

 thanks,

Daniel

> Petr Sumbera wrote:
> >What about this one? It again worked for me in both cases.
> >
> >Thanks,
> >
> >Petr
> >
> >--- libxml2-2.6.30/uri.c.orig   Tue Nov 20 01:44:59 2007
> >+++ libxml2-2.6.30/uri.c        Tue Nov 20 01:45:29 2007
> >@@ -2418,6 +2418,12 @@
> >
> >     if (path == NULL)
> >        return(NULL);
> >+
> >+    /* sanitize filename starting with // so it can be used as URI */
> >+    if (strlen(path) > 2 && path[0]=='/'
> >+        && path[1]=='/' && path[2]!='/')
> >+       path++;
> >+
> >     if ((uri = xmlParseURI((const char *) path)) != NULL) {
> >        xmlFreeURI(uri);
> >        return xmlStrdup(path);
> >
> >
> >Daniel Veillard wrote:
> >>On Thu, Nov 08, 2007 at 05:54:27PM +0100, Petr Sumbera wrote:
> >>>Thanks for looking at it.
> >>>
> >>>Daniel Veillard wrote:
> >>>>On Thu, Nov 08, 2007 at 01:33:02PM +0100, Petr Sumbera wrote:
> >>>> Looks completely the wrong place to do this kind of changes.
> >>>>You just can't hack every single entry point in the library which
> >>>>may take a filename. What you need to understand and check is why 
> >>>>//foo/bar isn't recognized as a legal filename, as far as I can
> >>>It's little bit different problem. //foo/bar is recognized as file. 
> >>>Problem is that path to DTD file which is stated in //foo/bar XML 
> >>>file (e.g. /foo2/dtd) is wrongly processed to //foo/foo2/dtd.
> >>>
> >>>xmlNoNetExists() receives already wrong path (//foo/foo2/dtd).
> >>>
> >>>Any idea?
> >>
> >>  You misunderstood. //foo/bar should be converted to /foo/bar
> >>by the path canonicalization routine when the //foo/bar document is 
> >>loaded.
> >>
> >>Daniel
> >>
> >
> >
> 

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]