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 703963 - Crash when escaping some song titles
Crash when escaping some song titles
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-10 17:31 UTC by Stefano Facchini
Modified: 2013-07-11 09:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash in escaping some song titles (1.01 KB, patch)
2013-07-10 17:32 UTC, Stefano Facchini
committed Details | Review
Fix crash in escaping some song titles (1.01 KB, patch)
2013-07-11 09:16 UTC, Vadim Rutkovsky
committed Details | Review

Description Stefano Facchini 2013-07-10 17:31:44 UTC
g_markup_escape_text() expects the length of the string in bytes, but the length reported by get_title().length is the number of characters. This makes it crash with titles like "Io scriverò" (char length = 11, utf8 byte length = 12).

Assuming the title to be null-terminated fixes the issue. I'm not sure whether getAlbumSongs always returns null-terminated strings. If not, probabily it should be fixed to do that.
Comment 1 Stefano Facchini 2013-07-10 17:32:08 UTC
Created attachment 248858 [details] [review]
Fix crash in escaping some song titles
Comment 2 Vadim Rutkovsky 2013-07-11 09:16:18 UTC
Cannot reproduce it right now, but it seems to be similar to https://git.gnome.org/browse/gnome-music/commit/?id=6129c635

Thanks for the patch
The following fix has been pushed:
e7bb4a3 Fix crash in escaping some song titles
Comment 3 Vadim Rutkovsky 2013-07-11 09:16:25 UTC
Created attachment 248910 [details] [review]
Fix crash in escaping some song titles