diff -Nru xmms2-0.8+dfsg/debian/changelog xmms2-0.8+dfsg/debian/changelog --- xmms2-0.8+dfsg/debian/changelog 2023-07-29 21:18:42.000000000 +0100 +++ xmms2-0.8+dfsg/debian/changelog 2024-03-10 21:47:54.000000000 +0000 @@ -1,3 +1,9 @@ +xmms2 (0.8+dfsg-23ubuntu0.1) mantic; urgency=medium + + * Fix coredump with long pathnames. (LP: #2018449) + + -- Sudip Mukherjee Sun, 10 Mar 2024 21:47:54 +0000 + xmms2 (0.8+dfsg-23build1) mantic; urgency=medium * Rebuild against new libavcodec60. diff -Nru xmms2-0.8+dfsg/debian/control xmms2-0.8+dfsg/debian/control --- xmms2-0.8+dfsg/debian/control 2023-06-02 09:08:57.000000000 +0100 +++ xmms2-0.8+dfsg/debian/control 2024-03-10 21:47:54.000000000 +0000 @@ -1,7 +1,8 @@ Source: xmms2 Section: sound Priority: optional -Maintainer: Debian QA Group +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian QA Group Standards-Version: 3.9.8 Build-Depends: cython3, debhelper-compat (= 13), diff -Nru xmms2-0.8+dfsg/debian/patches/fix-path-size.patch xmms2-0.8+dfsg/debian/patches/fix-path-size.patch --- xmms2-0.8+dfsg/debian/patches/fix-path-size.patch 1970-01-01 01:00:00.000000000 +0100 +++ xmms2-0.8+dfsg/debian/patches/fix-path-size.patch 2024-03-10 21:47:43.000000000 +0000 @@ -0,0 +1,37 @@ +From 26651394137b8db1164af91ee5e8f21386285fd4 Mon Sep 17 00:00:00 2001 +From: Sudip Mukherjee +Date: Sat, 9 Mar 2024 12:34:36 +0000 +Subject: [PATCH] clients/nycli/utils.c: Fix buffer overflow + +format_url() is only assigning 255 bytes for the rpath, but the path will +be expanded by realpath() which can return a sring up to a maximum of +PATH_MAX bytes. And, so as a result, if long path names are used or +while creating playlists with multiple files we get a coredump with the +error: + +*** buffer overflow detected ***: terminated +Aborted (core dumped) + +Lets use PATH_MAX for rpath length so that we have buffer for the +maximum return from realpath(). + +Signed-off-by: Sudip Mukherjee + +Origin: upstream, https://github.com/xmms2/xmms2-devel/commit/26651394137b8db1164af91ee5e8f21386285fd4 +Bug-Ubuntu: https://launchpad.net/bugs/2018449 +Last-Update: 2024-03-10 +--- + src/clients/nycli/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +index c97d561b4..3dbf3afb0 100644 +--- a/src/clients/nycli/utils.c ++++ b/src/clients/nycli/utils.c +@@ -427,7 +427,7 @@ encode_url (gchar *url) + gchar * + format_url (const gchar *path, GFileTest test) + { +- gchar rpath[XMMS_PATH_MAX]; ++ gchar rpath[PATH_MAX]; + const gchar *p; + gchar *url; diff -Nru xmms2-0.8+dfsg/debian/patches/series xmms2-0.8+dfsg/debian/patches/series --- xmms2-0.8+dfsg/debian/patches/series 2023-06-02 09:08:57.000000000 +0100 +++ xmms2-0.8+dfsg/debian/patches/series 2024-03-10 21:47:54.000000000 +0000 @@ -24,3 +24,4 @@ use-modern-waf.patch fix-python-enum-declaration.patch ffmpeg-5-ed86b39.patch +fix-path-size.patch