From c1425570eba79ed0988d12ff92f62aaec021128e4bcc63b27c916140f38bd5c9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 8 Apr 2022 14:23:24 +0000 Subject: [PATCH] Accepting request 967834 from home:manfred-h - Add id3_ucs4_length-sanity-check.patch as Patch0. The patch helps to avoid a segfault in programs using this library, such as minidlna and potentially others; for details see and OBS-URL: https://build.opensuse.org/request/show/967834 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libid3tag?expand=0&rev=21 --- id3_ucs4_length-sanity-check.patch | 13 +++++++++++++ libid3tag.changes | 9 +++++++++ libid3tag.spec | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 id3_ucs4_length-sanity-check.patch diff --git a/id3_ucs4_length-sanity-check.patch b/id3_ucs4_length-sanity-check.patch new file mode 100644 index 0000000..d2b5bda --- /dev/null +++ b/id3_ucs4_length-sanity-check.patch @@ -0,0 +1,13 @@ +diff -rup libid3tag-0.16.1.orig/ucs4.c libid3tag-0.16.1/ucs4.c +--- libid3tag-0.16.1.orig/ucs4.c 2021-08-15 22:52:07.000000000 +0200 ++++ libid3tag-0.16.1/ucs4.c 2022-04-08 09:47:54.980481313 +0200 +@@ -39,6 +39,9 @@ id3_length_t id3_ucs4_length(id3_ucs4_t + { + id3_ucs4_t const *ptr = ucs4; + ++ if (! ucs4) ++ return 0; ++ + while (*ptr) + ++ptr; + diff --git a/libid3tag.changes b/libid3tag.changes index abf3027..8d8796a 100644 --- a/libid3tag.changes +++ b/libid3tag.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Apr 8 13:46:43 UTC 2022 - Manfred Hollstein + +- Add id3_ucs4_length-sanity-check.patch as Patch0. + The patch helps to avoid a segfault in programs using this library, + such as minidlna and potentially others; for details see + and + + ------------------------------------------------------------------- Thu Dec 9 19:22:27 UTC 2021 - Ferdinand Thiessen diff --git a/libid3tag.spec b/libid3tag.spec index 594c9a6..9f21b30 100644 --- a/libid3tag.spec +++ b/libid3tag.spec @@ -1,7 +1,7 @@ # # spec file for package libid3tag # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ Group: Development/Libraries/C and C++ URL: https://github.com/tenacityteam/libid3tag Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf +Patch0: id3_ucs4_length-sanity-check.patch BuildRequires: c++_compiler BuildRequires: cmake BuildRequires: gperf @@ -55,6 +56,7 @@ develop applications with libid3tag. %prep %setup -q +%patch0 -p1 %build %cmake