Apply two fixes from upstream git:
- Corrupted FLAC files scan can result in heavy CPU consumption: fix it by considering a file as being invalid if a 0 length block is found - Fix a crash when saving xm files While here, also sync patches/patch-tests_CMakeLists_txt with upstream
This commit is contained in:
parent
c887ec68b6
commit
c3bcdaf164
@ -1,7 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2012/10/01 07:31:17 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2012/10/10 10:51:01 dcoppa Exp $
|
||||
|
||||
COMMENT= managing meta-data of audio formats
|
||||
DISTNAME= taglib-1.8
|
||||
REVISION= 0
|
||||
CATEGORIES= audio devel
|
||||
|
||||
MASTER_SITES= https://github.com/downloads/taglib/taglib/
|
||||
|
17
audio/taglib/patches/patch-taglib_flac_flacfile_cpp
Normal file
17
audio/taglib/patches/patch-taglib_flac_flacfile_cpp
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-taglib_flac_flacfile_cpp,v 1.1 2012/10/10 10:51:02 dcoppa Exp $
|
||||
|
||||
Corrupted FLAC files scan can result in heavy CPU consumption: fix
|
||||
it by considering a file as being invalid if a 0 length block is
|
||||
found (upstream git commit ad9ffc62e6fac5c47f46eb96b39c614e32742eb5)
|
||||
|
||||
--- taglib/flac/flacfile.cpp.orig Wed Oct 10 12:21:53 2012
|
||||
+++ taglib/flac/flacfile.cpp Wed Oct 10 12:22:25 2012
|
||||
@@ -425,7 +425,7 @@ void FLAC::File::scan()
|
||||
length = header.mid(1, 3).toUInt();
|
||||
|
||||
ByteVector data = readBlock(length);
|
||||
- if(data.size() != length) {
|
||||
+ if(data.size() != length || length == 0) {
|
||||
debug("FLAC::File::scan() -- FLAC stream corrupted");
|
||||
setValid(false);
|
||||
return;
|
16
audio/taglib/patches/patch-taglib_xm_xmfile_cpp
Normal file
16
audio/taglib/patches/patch-taglib_xm_xmfile_cpp
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-taglib_xm_xmfile_cpp,v 1.1 2012/10/10 10:51:02 dcoppa Exp $
|
||||
|
||||
Fix a crash when saving xm files
|
||||
(upstream git commit 2d7414733eaa3263868c74abfa6cff38a8afe8d3)
|
||||
|
||||
--- taglib/xm/xmfile.cpp.orig Wed Oct 10 12:24:15 2012
|
||||
+++ taglib/xm/xmfile.cpp Wed Oct 10 12:24:40 2012
|
||||
@@ -443,7 +443,7 @@ bool XM::File::save()
|
||||
return false;
|
||||
|
||||
uint len = std::min(22UL, instrumentHeaderSize - 4U);
|
||||
- if(i > lines.size())
|
||||
+ if(i >= lines.size())
|
||||
writeString(String::null, len);
|
||||
else
|
||||
writeString(lines[i], len);
|
@ -1,9 +1,16 @@
|
||||
$OpenBSD: patch-tests_CMakeLists_txt,v 1.2 2012/10/01 07:31:17 dcoppa Exp $
|
||||
--- tests/CMakeLists.txt.orig Fri Sep 28 14:19:44 2012
|
||||
+++ tests/CMakeLists.txt Fri Sep 28 14:20:02 2012
|
||||
@@ -1,4 +1,5 @@
|
||||
INCLUDE_DIRECTORIES(
|
||||
+ ${CPPUNIT_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ape
|
||||
$OpenBSD: patch-tests_CMakeLists_txt,v 1.3 2012/10/10 10:51:02 dcoppa Exp $
|
||||
|
||||
Add missing CppUnit include directive
|
||||
(upstream git commit 72f9a96cceba0e22a672760961de3a87e291a602)
|
||||
|
||||
--- tests/CMakeLists.txt.orig Thu Sep 6 20:03:15 2012
|
||||
+++ tests/CMakeLists.txt Wed Oct 10 12:23:55 2012
|
||||
@@ -62,6 +62,8 @@ SET(test_runner_SRCS
|
||||
test_mpc.cpp
|
||||
)
|
||||
|
||||
+INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR})
|
||||
+
|
||||
ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
|
||||
TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user