[xml] bug in xmlIO.c:xmlGzfileOpen

Date view Thread view Subject view Author view

From: Gary Pennington (Gary.Pennington@uk.sun.com)
Date: Thu Jan 18 2001 - 08:51:18 EST


Hi,

There are a couple of small bugs in the named function. We need to keep
one of the slashes in the match for file:/// otherwise we lose the start
of our path and we should open path after working out what it is rather
than filename.

Patch is :-

bash-2.03# diff -c ~garyp/orig/libxml2-2.2.11/xmlIO.c xmlIO.c
*** /home/garyp/orig/libxml2-2.2.11/xmlIO.c Fri Jan 5 06:39:29 2001

--- xmlIO.c Thu Jan 18 13:43:47 2001
***************
*** 400,410 ****
      if (!strncmp(filename, "file://localhost", 16))
        path = &filename[16];
      else if (!strncmp(filename, "file:///", 8))
! path = &filename[8];
      else
        path = filename;

! fd = gzopen(filename, "rb");
      return((void *) fd);
  }

--- 400,410 ----
      if (!strncmp(filename, "file://localhost", 16))
        path = &filename[16];
      else if (!strncmp(filename, "file:///", 8))
! path = &filename[7];
      else
        path = filename;

! fd = gzopen(path, "rb");
      return((void *) fd);
  }

bash-2.03#

Yours,

Gary

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 18 2001 - 10:44:37 EST