Adding 02-Fix-potential-access-violation.patch from upstream (Closes: #862570).
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 14 May 2017 19:38:30 +0000 (22:38 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sun, 14 May 2017 19:38:30 +0000 (22:38 +0300)
debian/control
debian/patches/02-Fix-potential-access-violation.patch [new file with mode: 0644]
debian/patches/series

index 335fdb9..ee6a37b 100644 (file)
@@ -16,7 +16,7 @@ Package: libmenu-cache3
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
-Depends: ${misc:Depends}, ${shlibs:Depends}, libmenu-cache-bin (>= 0.6.0)
+Depends: ${misc:Depends}, ${shlibs:Depends}, libmenu-cache-bin (>= 0.7.0)
 Conflicts: libmenu-cache1
 Description: LXDE implementation of the freedesktop Menu's cache
  Libmenu-cache is a library creating and utilizing caches to speed up
diff --git a/debian/patches/02-Fix-potential-access-violation.patch b/debian/patches/02-Fix-potential-access-violation.patch
new file mode 100644 (file)
index 0000000..3699547
--- /dev/null
@@ -0,0 +1,20 @@
+Author: Andriy Grytsenko <andrej@rep.kiev.ua>
+Description: Fix potential access violation, use runtime user dir instead of tmp dir. (Closes: #862570)
+Applied-Upstream: 56f66684592abf257c4004e6e1fff041c64a12ce
+
+--- a/libmenu-cache/menu-cache.c
++++ b/libmenu-cache/menu-cache.c
+@@ -1538,8 +1538,13 @@ static void get_socket_name( char* buf, int len )
+         if(*p)
+             *p = '\0';
+     }
++#if GLIB_CHECK_VERSION(2, 28, 0)
++    g_snprintf( buf, len, "%s/menu-cached-%s", g_get_user_runtime_dir(),
++                dpy ? dpy : ":0" );
++#else
+     g_snprintf( buf, len, "%s/.menu-cached-%s-%s", g_get_tmp_dir(),
+                 dpy ? dpy : ":0", g_get_user_name() );
++#endif
+     g_free(dpy);
+ }
index 835f7ff..9fb38a3 100644 (file)
@@ -1 +1,2 @@
 01-Fix-crash-with-invalid-Name-tag-in-a-menu.patch
+02-Fix-potential-access-violation.patch