diff -Nru kde-workspace-4.11.9/debian/changelog kde-workspace-4.11.9/debian/changelog --- kde-workspace-4.11.9/debian/changelog 2014-05-06 10:55:11.000000000 +0000 +++ kde-workspace-4.11.9/debian/changelog 2014-05-06 14:34:36.000000000 +0000 @@ -1,3 +1,10 @@ +kde-workspace (4:4.11.9-0ubuntu0.2) trusty; urgency=medium + + * Add upstream_Dont-crash-when-no-desktopnames.patch to make KDM not crash + on desktop files that don't set a DesktopNames field + + -- Rohan Garg Tue, 06 May 2014 16:34:35 +0200 + kde-workspace (4:4.11.9-0ubuntu0.1) trusty; urgency=medium * New upstream release (LP: #1312806) diff -Nru kde-workspace-4.11.9/debian/patches/series kde-workspace-4.11.9/debian/patches/series --- kde-workspace-4.11.9/debian/patches/series 2014-05-06 10:35:19.000000000 +0000 +++ kde-workspace-4.11.9/debian/patches/series 2014-05-06 14:34:02.000000000 +0000 @@ -34,3 +34,4 @@ kubuntu_avoid_zic_and_deep_copy_timezone_data.diff kubuntu_kcm_display_add_kscreen.diff kubuntu_dont-force-on-path.patch +upstream_Dont-crash-when-no-desktopnames.patch diff -Nru kde-workspace-4.11.9/debian/patches/upstream_Dont-crash-when-no-desktopnames.patch kde-workspace-4.11.9/debian/patches/upstream_Dont-crash-when-no-desktopnames.patch --- kde-workspace-4.11.9/debian/patches/upstream_Dont-crash-when-no-desktopnames.patch 1970-01-01 00:00:00.000000000 +0000 +++ kde-workspace-4.11.9/debian/patches/upstream_Dont-crash-when-no-desktopnames.patch 2014-05-06 14:33:33.000000000 +0000 @@ -0,0 +1,33 @@ +commit e1724800ecf3c6a7035dfa7bcaa50b2a8f48688f +Author: David Faure +Date: Fri May 2 10:26:38 2014 +0200 + + Fix crash when DesktopNames isn't set + + BUG: 334159 + FIXED-IN: 4.11.10 + +diff --git a/kdm/backend/client.c b/kdm/backend/client.c +index 335cc3e..a2d06c2 100644 +--- a/kdm/backend/client.c ++++ b/kdm/backend/client.c +@@ -1810,12 +1810,14 @@ startClient(volatile int *pid) + !(sessargs = iniEntry(str, "Desktop Entry", "Exec", 0))) + sessargs = ""; + buf = iniEntry(str, "Desktop Entry", "DesktopNames", 0); +- for (buf2 = buf; *buf2; ++buf2) { +- if (*buf2 == ';') +- *buf2 = ':'; ++ if (buf) { ++ for (buf2 = buf; *buf2; ++buf2) { ++ if (*buf2 == ';') ++ *buf2 = ':'; ++ } ++ userEnviron = setEnv(userEnviron, "XDG_CURRENT_DESKTOP", buf); ++ free(buf); + } +- userEnviron = setEnv(userEnviron, "XDG_CURRENT_DESKTOP", buf); +- free(buf); + free(str); + free(fname); + goto gotit;