diff -Nru gtkpod-2.1.5/debian/changelog gtkpod-2.1.5/debian/changelog --- gtkpod-2.1.5/debian/changelog 2023-02-13 08:41:30.000000000 +1300 +++ gtkpod-2.1.5/debian/changelog 2024-03-20 15:36:12.000000000 +1300 @@ -1,3 +1,12 @@ +gtkpod (2.1.5-10ubuntu1) mantic; urgency=medium + + * Fix segmentation fault when parsing multibyte characters, + by parsing entire string instead of first two bytes. + (LP: #2044420) + - d/p/lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch + + -- Matthew Ruffell Wed, 20 Mar 2024 15:36:12 +1300 + gtkpod (2.1.5-10) unstable; urgency=medium * Remove debian/libatomicparsley0.symbols, it is a mess for diff -Nru gtkpod-2.1.5/debian/patches/lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch gtkpod-2.1.5/debian/patches/lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch --- gtkpod-2.1.5/debian/patches/lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch 1970-01-01 12:00:00.000000000 +1200 +++ gtkpod-2.1.5/debian/patches/lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch 2024-03-20 15:36:09.000000000 +1300 @@ -0,0 +1,33 @@ +commit 4dc6026824f6fec37ee26fee2ba24a0081a182f9 +From: Matthew Ruffell +Date: Wed, 20 Mar 2024 14:52:25 +1300 +Subject: Fix segmentation fault when collating halfway through + multibyte characters + When parsing a song name, if it contains multibyte characters, e.g. characters + that contain accents, like 'ó', a recent change in glib causes gtkpod to + segfault. + + This is because fuzzy_skip_prefix() goes 2 characters into the string, and if + the second character is a multibyte string, it hits the issue, e.g.: + + "fórmula, vol. 2 (deluxe edition)" + + Strings are null terminated, so fix by changing g_utf8_collate_key() to use + len of -1. +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2044420 +Origin: vendor, +Last-Update: 2024-03-20 + +Index: gtkpod-2.1.5/libgtkpod/misc.c +=================================================================== +--- gtkpod-2.1.5.orig/libgtkpod/misc.c 2024-03-20 15:36:06.764003545 +1300 ++++ gtkpod-2.1.5/libgtkpod/misc.c 2024-03-20 15:36:06.764003545 +1300 +@@ -475,7 +475,7 @@ + + g_return_val_if_fail (csfk, 0); + +- tempStr = g_utf8_collate_key(cleanStr, csfk->length); ++ tempStr = g_utf8_collate_key(cleanStr, -1); + if (strcmp(tempStr, csfk->key) == 0) { + /* Found article, bump pointers ahead appropriate distance + */ diff -Nru gtkpod-2.1.5/debian/patches/series gtkpod-2.1.5/debian/patches/series --- gtkpod-2.1.5/debian/patches/series 2021-01-01 13:47:37.000000000 +1300 +++ gtkpod-2.1.5/debian/patches/series 2024-03-20 15:36:03.000000000 +1300 @@ -1 +1,2 @@ 0001-Fix_mab2vcard_issue.patch +lp2044420-Fix-segmentation-fault-when-collating-halfway-throug.patch