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 165693 - gtk_rc_parse_style: shouldn't modify scanner->value
gtk_rc_parse_style: shouldn't modify scanner->value
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.6.x
Other Linux
: Normal enhancement
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-30 12:33 UTC by Tommi Komulainen
Modified: 2005-04-06 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.11 KB, patch)
2005-01-30 12:34 UTC, Tommi Komulainen
none Details | Review

Description Tommi Komulainen 2005-01-30 12:33:10 UTC
While it is not explicitly documented I believe GScanner::value and next_value
are meant to be considered read only.  gtk_rc_parse_style() shouldn't modify the
value directly but make a copy first, like is done in gtk_rc_parse_statement()

Motivation for considering the value read only is that then one can implement a
pre-parsed mmappable cache and all strings could point in the cache directly and
avoid extra copies.
Comment 1 Tommi Komulainen 2005-01-30 12:34:46 UTC
Created attachment 36718 [details] [review]
proposed patch
Comment 2 Matthias Clasen 2005-04-06 12:48:33 UTC
2005-04-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
	copy it first.  (#165693, Tommi Komulainen)