diff -Nru xmms2-0.8+dfsg/debian/changelog xmms2-0.8+dfsg/debian/changelog --- xmms2-0.8+dfsg/debian/changelog 2022-03-16 18:06:41.000000000 +0000 +++ xmms2-0.8+dfsg/debian/changelog 2024-03-10 21:57:26.000000000 +0000 @@ -1,3 +1,9 @@ +xmms2 (0.8+dfsg-22ubuntu0.1) jammy; urgency=medium + + * Fix coredump with long pathnames. (LP: #2018449) + + -- Sudip Mukherjee Sun, 10 Mar 2024 21:57:26 +0000 + xmms2 (0.8+dfsg-22build3) jammy; urgency=medium * No-change rebuild with Python 3.10 only 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:56:57.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 2021-02-06 12:55:30.000000000 +0000 +++ xmms2-0.8+dfsg/debian/patches/series 2024-03-10 21:57:13.000000000 +0000 @@ -23,3 +23,4 @@ upgrade-waf-2.0.20.patch use-modern-waf.patch fix-python-enum-declaration.patch +fix-path-size.patch