[pulseaudio-tickets] [Bug 55607] crash because of null string on solaris

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 10 07:40:24 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=55607

--- Comment #3 from Pierre Ossman <pierre-bugzilla at ossman.eu> ---
Threads not created by PulseAudio however can lack a name. In this case the
main thread.

Alternative patch using pa_strnull():

Index: src/pulsecore/log.c
===================================================================
--- src/pulsecore/log.c    (revision 27649)
+++ src/pulsecore/log.c    (working copy)
@@ -303,9 +303,9 @@
     pa_vsnprintf(text, sizeof(text), format, ap);

     if ((_flags & PA_LOG_PRINT_META) && file && line > 0 && func)
-        pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ",
pa_thread_get_name(pa_thread_self()), file, line, func);
+        pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ",
pa_strnull(pa_thread_get_name(pa_thread_self())), file, line, func);
     else if ((_flags & (PA_LOG_PRINT_META|PA_LOG_PRINT_FILE)) && file)
-        pa_snprintf(location, sizeof(location), "[%s] %s: ",
pa_thread_get_name(pa_thread_self()), pa_path_get_filename(file));
+        pa_snprintf(location, sizeof(location), "[%s] %s: ",
pa_strnull(pa_thread_get_name(pa_thread_self())), pa_path_get_filename(file));
     else
         location[0] = 0;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20130710/93e4de97/attachment-0001.html>


More information about the pulseaudio-bugs mailing list