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
  <https://github.com/tenacityteam/libid3tag/pull/7> and
  <https://github.com/tenacityteam/libid3tag/issues/6>

OBS-URL: https://build.opensuse.org/request/show/967834
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libid3tag?expand=0&rev=21
This commit is contained in:
Takashi Iwai 2022-04-08 14:23:24 +00:00 committed by Git OBS Bridge
parent 693a749a89
commit c1425570eb
3 changed files with 25 additions and 1 deletions

View File

@ -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;

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Apr 8 13:46:43 UTC 2022 - Manfred Hollstein <manfred.h@gmx.net>
- 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
<https://github.com/tenacityteam/libid3tag/pull/7> and
<https://github.com/tenacityteam/libid3tag/issues/6>
-------------------------------------------------------------------
Thu Dec 9 19:22:27 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -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