After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651202 - xmlSchemaCheckCOSNSSubset has a logic error in xmlSchemaCheckCOSNSSubset
xmlSchemaCheckCOSNSSubset has a logic error in xmlSchemaCheckCOSNSSubset
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-27 00:20 UTC by Ryan Sleevi
Modified: 2012-02-29 02:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch from chromium's third_party/libxml/patches/ (472 bytes, patch)
2011-09-29 21:51 UTC, Jonathan Nieder
none Details | Review

Description Ryan Sleevi 2011-05-27 00:20:08 UTC
This bug was reported by a static analyzer run against the Chromium browser, which uses libxml2, with the downstream bug at http://code.google.com/p/chromium/issues/detail?id=84132

The following is the original error report:

V501 There are identical sub-expressions 'sub->negNsSet->value' to the left and to the right of the '==' operator. libxml xmlschemas.c 13949

static int
xmlSchemaCheckCOSNSSubset(...)
{
  ...
  if ((sub->negNsSet != NULL) &&
      (super->negNsSet != NULL) &&
      (sub->negNsSet->value == sub->negNsSet->value))
   return 0;
 ...
}


The correct check should be:
  if ((sub->negNsSet != NULL) &&
      (super->negNsSet != NULL) &&
      (sub->negNsSet->value == super->negNsSet->value))
   return 0;
Comment 1 Jonathan Nieder 2011-09-29 21:51:31 UTC
Created attachment 197824 [details] [review]
patch from chromium's third_party/libxml/patches/

Ping?  Obviously correct patch.  In use in chromium's bundled copy of libxml for three months.
Comment 2 Daniel Veillard 2012-02-29 02:58:22 UTC
Okay, makes total sense, applied and pushed to git head,

 thanks !

Daniel