update to 1.12

This commit is contained in:
tianlijing 2022-08-07 06:24:27 +08:00
parent 97351192cf
commit 7127d3816e
6 changed files with 5 additions and 108 deletions

View File

@ -1,33 +0,0 @@
From eb9ded1206f18f2c319157337edea2533a40bea6 Mon Sep 17 00:00:00 2001
From: "Stephen F. Booth" <me@sbooth.org>
Date: Sun, 23 Jul 2017 10:11:09 -0400
Subject: [PATCH] Don't assume TDRC is an instance of TextIdentificationFrame
If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
which causes problems in rebuildAggregateFrames() when it is assumed
that TDRC is a TextIdentificationFrame
---
taglib/mpeg/id3v2/id3v2framefactory.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp
index 759a9b7b..9347ab86 100644
--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp
+++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp
@@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
tag->frameList("TDAT").size() == 1)
{
TextIdentificationFrame *tdrc =
- static_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
+ dynamic_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
UnknownFrame *tdat = static_cast<UnknownFrame *>(tag->frameList("TDAT").front());
- if(tdrc->fieldList().size() == 1 &&
+ if(tdrc &&
+ tdrc->fieldList().size() == 1 &&
tdrc->fieldList().front().size() == 4 &&
tdat->data().size() >= 5)
{
--
2.13.5

View File

@ -1,46 +0,0 @@
From 2c4ae870ec086f2ddd21a47861a3709c36faac45 Mon Sep 17 00:00:00 2001
From: Scott Gayou <github.scott@gmail.com>
Date: Tue, 9 Oct 2018 18:46:55 -0500
Subject: [PATCH] Fixed OOB read when loading invalid ogg flac file. (#868)
(#869)
CVE-2018-11439 is caused by a failure to check the minimum length
of a ogg flac header. This header is detailed in full at:
https://xiph.org/flac/ogg_mapping.html. Added more strict checking
for entire header.
---
taglib/ogg/flac/oggflacfile.cpp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp
index 53d04508..07ea9dcc 100644
--- a/taglib/ogg/flac/oggflacfile.cpp
+++ b/taglib/ogg/flac/oggflacfile.cpp
@@ -231,11 +231,21 @@ void Ogg::FLAC::File::scan()
if(!metadataHeader.startsWith("fLaC")) {
// FLAC 1.1.2+
+ // See https://xiph.org/flac/ogg_mapping.html for the header specification.
+ if(metadataHeader.size() < 13)
+ return;
+
+ if(metadataHeader[0] != 0x7f)
+ return;
+
if(metadataHeader.mid(1, 4) != "FLAC")
return;
- if(metadataHeader[5] != 1)
- return; // not version 1
+ if(metadataHeader[5] != 1 && metadataHeader[6] != 0)
+ return; // not version 1.0
+
+ if(metadataHeader.mid(9, 4) != "fLaC")
+ return;
metadataHeader = metadataHeader.mid(13);
}
--
2.19.1

Binary file not shown.

BIN
taglib-1.12.tar.gz Normal file

Binary file not shown.

View File

@ -1,20 +0,0 @@
diff -up taglib-1.5rc1/taglib-config.cmake.multilib-2 taglib-1.5rc1/taglib-config.cmake
--- taglib-1.5rc1/taglib-config.cmake.multilib-2 2008-01-29 19:30:00.000000000 -0600
+++ taglib-1.5rc1/taglib-config.cmake 2008-02-13 06:41:11.000000000 -0600
@@ -16,7 +16,6 @@ EOH
prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${CMAKE_INSTALL_PREFIX}
-libdir=${LIB_INSTALL_DIR}
includedir=${INCLUDE_INSTALL_DIR}
flags=""
@@ -29,7 +28,7 @@ while test $# -gt 0
do
case $1 in
--libs)
- flags="$flags -L$libdir -ltag"
+ flags="$flags -ltag"
;;
--cflags)
flags="$flags -I$includedir/taglib"

View File

@ -1,18 +1,11 @@
Name: taglib
Summary: Audio Meta-Data Library
Version: 1.11.1
Release: 12
Version: 1.12
Release: 1
License: LGPLv2 or MPLv1.1
URL: https://taglib.github.io/
Source0: https://taglib.github.io/releases/%{name}-%{version}.tar.gz
# patch0 comes from redhat
Patch0: taglib-1.5rc1-multilib.patch
# patch1 comes from TagLib official
Patch1: 0001-Don-t-assume-TDRC-is-an-instance-of-TextIdentificati.patch
Patch6000: CVE-2018-11439-Fixed-OOB-read-when-loading-invalid-ogg-flac-file.-8.patch
BuildRequires: gcc gcc-c++ cmake pkgconfig zlib-devel
%description
@ -70,6 +63,9 @@ test "$(pkg-config --modversion taglib_c)" = "%{version}"
%changelog
* Sat Sep 10 2022 tianlijing <tianlijing@kylinos.cn> - 1.12-1
- update to 1.12
* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.11.1-12
- Type:bugfix
- ID:NA