From be6d67e4556a730857a53ead2260ffd83a9b4ef8d3805bb03e5fd675c5ff9932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 14 Nov 2018 06:35:14 +0000 Subject: [PATCH] Accepting request 648800 from home:jonaski:branches:openSUSE:Factory - Add patch to fix Ogg corruption See issue: https://github.com/taglib/taglib/issues/864 OBS-URL: https://build.opensuse.org/request/show/648800 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/taglib?expand=0&rev=77 --- taglib-fix-ogg.patch | 25 +++++++++++++++++++++++++ taglib.changes | 5 +++++ taglib.spec | 4 +++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 taglib-fix-ogg.patch diff --git a/taglib-fix-ogg.patch b/taglib-fix-ogg.patch new file mode 100644 index 0000000..97442cd --- /dev/null +++ b/taglib-fix-ogg.patch @@ -0,0 +1,25 @@ +From 9336c82da3a04552168f208cd7a5fa4646701ea4 Mon Sep 17 00:00:00 2001 +From: Tsuda Kageyu +Date: Thu, 1 Dec 2016 11:32:01 +0900 +Subject: [PATCH] Fix possible Ogg packet losses. + +--- + taglib/ogg/oggfile.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/taglib/ogg/oggfile.cpp b/taglib/ogg/oggfile.cpp +index 86b0b076..c36e4d46 100644 +--- a/taglib/ogg/oggfile.cpp ++++ b/taglib/ogg/oggfile.cpp +@@ -253,7 +253,7 @@ void Ogg::File::writePacket(unsigned int i, const ByteVector &packet) + ByteVectorList packets = firstPage->packets(); + packets[i - firstPage->firstPacketIndex()] = packet; + +- if(firstPage != lastPage && lastPage->packetCount() > 2) { ++ if(firstPage != lastPage && lastPage->packetCount() > 1) { + ByteVectorList lastPagePackets = lastPage->packets(); + lastPagePackets.erase(lastPagePackets.begin()); + packets.append(lastPagePackets); +-- +2.19.1 + diff --git a/taglib.changes b/taglib.changes index 76480c9..8e0e836 100644 --- a/taglib.changes +++ b/taglib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 13 22:29:57 UTC 2018 - Jonas Kvinge + +- Add patch to fix Ogg corruption + ------------------------------------------------------------------- Wed Jun 6 08:38:38 UTC 2018 - kbabioch@suse.com diff --git a/taglib.spec b/taglib.spec index 0877945..773fe74 100644 --- a/taglib.spec +++ b/taglib.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -29,6 +29,7 @@ Source100: baselibs.conf # PATCH-FIX-SECURITY taglib-CVE-2017-12678.patch bsc1052699 CVE-2017-12678 sbrabec@suse.com -- Prevent denial of service. Patch0: taglib-CVE-2017-12678.patch Patch1: taglib-CVE-2018-11439.patch +Patch2: taglib-fix-ogg.patch BuildRequires: cmake >= 2.8 BuildRequires: doxygen BuildRequires: fdupes @@ -94,6 +95,7 @@ This package contains development files for taglib. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %cmake \