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 655007 - Use g_utf8_validate for file loading
Use g_utf8_validate for file loading
Status: RESOLVED FIXED
Product: sushi
Classification: Core
Component: libsushi
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Sushi maintainer(s)
Sushi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-07-20 21:01 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2011-07-26 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
invalid char (973 bytes, patch)
2011-07-20 21:09 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review

Description Ignacio Casal Quinteiro (nacho) 2011-07-20 21:01:13 UTC
You must validate the text before setting into the text buffer.

http://git.gnome.org/browse/sushi/tree/src/libsushi/sushi-text-loader.c#n181
Comment 1 Ignacio Casal Quinteiro (nacho) 2011-07-20 21:09:19 UTC
Created attachment 192337 [details] [review]
invalid char

This should do it, although I didn't test it.
Comment 2 Cosimo Cecchi 2011-07-26 14:51:21 UTC
Thanks for the patch, I pushed a slightly modified version of this to git master now.