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 395099 - overly agressive rule matching
overly agressive rule matching
Status: RESOLVED FIXED
Product: libcroco
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: libcroco maintainers
libcroco maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-10 18:18 UTC by Dominic Lachowicz
Modified: 2007-01-10 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bruno's patch (3.15 KB, patch)
2007-01-10 18:19 UTC, Dominic Lachowicz
none Details | Review
Same patch computed on HEAD (1.78 KB, patch)
2007-01-10 21:25 UTC, Benjamin Dauvergne
committed Details | Review

Description Dominic Lachowicz 2007-01-10 18:18:51 UTC
#3 from http://mail.gnome.org/archives/libcroco-list/2006-November/msg00000.html

In cr-sel-eng.c, there are several uses of strncmp that look fishy.
For example, in id_add_sel_matches_node (cr-sel-eng.c:275), if the XML node
has the "id" "foobar", and the selector is "#foo", i.e.
a_add_sel->content.id_name->stryng->str = "foo", the rule will match!

Untested, proposed patch is included in this email:

http://mail.gnome.org/archives/libcroco-list/2007-January/msg00011.html
Comment 1 Dominic Lachowicz 2007-01-10 18:19:20 UTC
Created attachment 79977 [details] [review]
Bruno's patch
Comment 2 Benjamin Dauvergne 2007-01-10 21:25:55 UTC
Created attachment 79988 [details] [review]
Same patch computed on HEAD

It looks ok to me.
Comment 3 Dominic Lachowicz 2007-01-10 21:37:19 UTC
Thanks.