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 634182 - SIGSEGV in unique_message_data_get_text
SIGSEGV in unique_message_data_get_text
Status: RESOLVED FIXED
Product: libunique
Classification: Other
Component: core
1.1.x
Other Linux
: Normal normal
: ---
Assigned To: libunique-maint
libunique-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-06 17:25 UTC by Dmitry Olyenyov
Modified: 2011-03-27 09:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (443 bytes, patch)
2010-11-06 17:26 UTC, Dmitry Olyenyov
rejected Details | Review

Description Dmitry Olyenyov 2010-11-06 17:25:45 UTC
If message_data.data contains NULL, this function call g_utf8_validate with  NULL and it crashes with SIGSEGV

Quick & dirty patch attached
Comment 1 Dmitry Olyenyov 2010-11-06 17:26:41 UTC
Created attachment 173959 [details] [review]
patch
Comment 2 Emmanuele Bassi (:ebassi) 2010-11-07 17:11:22 UTC
Review of attachment 173959 [details] [review]:

::: libunique-1.1.6.orig/unique/uniquemessage.c
@@ +302,3 @@
 
+  if(!message_data->data) return NULL;
+

please, follow the coding style of libunique; it is the same as the GTK+ coding style.
Comment 3 Dmitry Olyenyov 2010-11-08 15:21:52 UTC
Sorry, it was just quick'n'dirty hack to make totem player work. And, because I don't know english well enough I decided to post the code instead of explanation.. :)
Comment 4 Emmanuele Bassi (:ebassi) 2011-03-27 09:00:58 UTC
Thanks, ended up rewriting the patch using the length field instead of checking for NULL.