diff -Nru indicator-session-12.10.5+14.04.20150404/debian/changelog indicator-session-12.10.5+14.04.20151008/debian/changelog --- indicator-session-12.10.5+14.04.20150404/debian/changelog 2015-10-14 14:07:32.000000000 +0000 +++ indicator-session-12.10.5+14.04.20151008/debian/changelog 2015-10-14 14:07:33.000000000 +0000 @@ -1,3 +1,11 @@ +indicator-session (12.10.5+14.04.20151008-0ubuntu1) trusty; urgency=medium + + * Backport fix for segfault in get_user_label() (lp: #1501244) (LP: + #1501244) + * chmod +x debian/rules + + -- Sebastien Bacher Thu, 08 Oct 2015 16:33:40 +0000 + indicator-session (12.10.5+14.04.20150404-0ubuntu1) trusty; urgency=medium [ Dmitry Shachnev ] diff -Nru indicator-session-12.10.5+14.04.20150404/src/service.c indicator-session-12.10.5+14.04.20151008/src/service.c --- indicator-session-12.10.5+14.04.20150404/src/service.c 2015-04-04 09:29:26.000000000 +0000 +++ indicator-session-12.10.5+14.04.20151008/src/service.c 2015-10-08 16:33:33.000000000 +0000 @@ -295,12 +295,21 @@ { const char * c; - /* If blank or whitespace, use username instead */ - for (c = user->real_name; *c != '\0' && g_ascii_isspace (*c); c++); - if (*c == '\0') - return user->user_name; + /* if real_name exists and is printable, use it */ + c = user->real_name; + if ((c != NULL) && g_utf8_validate(c, -1, NULL)) + { + while (*c != '\0') + { + if (g_unichar_isgraph(g_utf8_get_char(c))) + return user->real_name; - return user->real_name; + c = g_utf8_next_char(c); + } + } + + /* otherwise, use this as a fallback */ + return user->user_name; } static const char *