Re: [xml] bug fix



On Fri, Jun 11, 2004 at 04:36:50PM +0200, lode leroy wrote:
I'm unable to access bugzilla from behind our MSPROXY, so I hope I can post 
patches here...

This makes the code agree with the comments, and in this case, I think the 
comments
were right, and the code wrong...

diff -bruw libxml2-2.6.10-orig/parser.c libxml2-2.6.10/parser.c
--- ./libxml2-2.6.10/parser.c   2004-05-14 23:49:20.000000000 +0200
+++ /prj/ProjectorXML/libxml2-2.6.10/parser.c   2004-06-11 
15:25:57.587713600 +0
200
@@ -9057,7 +9057,7 @@
               if (!terminate) {
                   if (ctxt->progressive) {
                       /* > can be found unescaped in attribute values */
-                       if ((lastlt == NULL) || (ctxt->input->cur >= 
lastlt))
+                       if ((lastgt == NULL) || (ctxt->input->cur >= 
lastgt))
                           goto done;
                   } else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) 
{
                       goto done;

  No, the code is right and the "bug fix" is buggy. It's very easy to see,
it breaks the regression tests which was added especially to show the bug
when doing it the wrong way !

paphio:~/XML -> xmllint --stream test/att6
test/att6:4: parser error : AttValue: ' expected
edOrder.SellersOrderID.schemeAgencyID" schemeVersionID="pvalue->ReferencedOrder. 
Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://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]