[vlc-commits] contrib: update libmatroska to 1.5.1
Steve Lhomme
git at videolan.org
Mon May 27 09:15:38 CEST 2019
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon May 27 09:11:03 2019 +0200| [f5d9cf06fd9656f86574662e6d10c78fa442d3df] | committer: Steve Lhomme
contrib: update libmatroska to 1.5.1
(cherry picked from commit cfb18f369dcbe4639b1ca641e8c09ed9d1a990df)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f5d9cf06fd9656f86574662e6d10c78fa442d3df
---
...-not-attempt-to-use-laced-sizes-that-are-.patch | 54 ----------------------
...on-t-reset-potentially-unallocated-memory.patch | 29 ------------
contrib/src/matroska/SHA512SUMS | 2 +-
contrib/src/matroska/rules.mak | 4 +-
4 files changed, 2 insertions(+), 87 deletions(-)
diff --git a/contrib/src/matroska/0001-KaxBlock-do-not-attempt-to-use-laced-sizes-that-are-.patch b/contrib/src/matroska/0001-KaxBlock-do-not-attempt-to-use-laced-sizes-that-are-.patch
deleted file mode 100644
index 0ec07f6661..0000000000
--- a/contrib/src/matroska/0001-KaxBlock-do-not-attempt-to-use-laced-sizes-that-are-.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 1ec615ec2b825523ecb1132794bbe771d2817b70 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 11 Feb 2019 12:15:58 +0100
-Subject: [PATCH] KaxBlock: do not attempt to use laced sizes that are clearly
- invalid
-
----
- src/KaxBlock.cpp | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp
-index 878d9a2..a1df83e 100644
---- a/src/KaxBlock.cpp
-+++ b/src/KaxBlock.cpp
-@@ -628,7 +628,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
- // put all Frames in the list
- if (mLacing != LACING_NONE) {
- // read the number of frames in the lace
-- uint32 LastBufferSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame
-+ const uint32 TotalLacedSize = GetSize() - BlockHeadSize - 1; // 1 for number of frame
-+ uint32 LastBufferSize = TotalLacedSize;
- uint8 FrameNum = _TempHead[0]; // number of frames in the lace - 1
- // read the list of frame sizes
- uint8 Index;
-@@ -646,6 +647,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
- do {
- Result += input.read(_TempHead, 1);
- FrameSize += uint8(_TempHead[0]);
-+ if (FrameSize > TotalLacedSize)
-+ throw SafeReadIOCallback::EndOfStreamX(0);
- LastBufferSize--;
-
- FirstFrameLocation++;
-@@ -662,6 +665,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
- cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes
- Result += input.read(cursor, FrameNum*4);
- FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);
-+ if (FrameSize > TotalLacedSize)
-+ throw SafeReadIOCallback::EndOfStreamX(0);
- SizeList[0] = FrameSize;
- cursor += SizeRead;
- LastBufferSize -= FrameSize + SizeRead;
-@@ -670,6 +675,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
- // get the size of the frame
- SizeRead = LastBufferSize;
- FrameSize += ReadCodedSizeSignedValue(cursor, SizeRead, SizeUnknown);
-+ if (FrameSize > TotalLacedSize)
-+ throw SafeReadIOCallback::EndOfStreamX(0);
- SizeList[Index] = FrameSize;
- cursor += SizeRead;
- LastBufferSize -= FrameSize + SizeRead;
---
-2.19.1.windows.1
-
diff --git a/contrib/src/matroska/0001-KaxBlock-don-t-reset-potentially-unallocated-memory.patch b/contrib/src/matroska/0001-KaxBlock-don-t-reset-potentially-unallocated-memory.patch
deleted file mode 100644
index caaf040ffc..0000000000
--- a/contrib/src/matroska/0001-KaxBlock-don-t-reset-potentially-unallocated-memory.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3fa2eeae1d9148b00ff7cebda7304de90ece575b Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 11 Feb 2019 09:51:30 +0100
-Subject: [PATCH] KaxBlock: don't reset potentially unallocated memory
-
-When using SCOPE_PARTIAL_DATA the GetBuffer()/Data pointer is never allocated.
-If this exception occurs we must not write on NULL pointed data.
-
-When the memory is allocated it doesn't have any use to reset the memory to 0
-since SetValueIsSet(false) is called right before, invalidating the buffer.
----
- src/KaxBlock.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp
-index 3fa18e5..878d9a2 100644
---- a/src/KaxBlock.cpp
-+++ b/src/KaxBlock.cpp
-@@ -703,7 +703,6 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
- } catch (SafeReadIOCallback::EndOfStreamX &) {
- SetValueIsSet(false);
-
-- std::memset(EbmlBinary::GetBuffer(), 0, GetSize());
- myBuffers.clear();
- SizeList.clear();
- Timecode = 0;
---
-2.19.1.windows.1
-
diff --git a/contrib/src/matroska/SHA512SUMS b/contrib/src/matroska/SHA512SUMS
index 2e92e95f4e..9108cf844f 100644
--- a/contrib/src/matroska/SHA512SUMS
+++ b/contrib/src/matroska/SHA512SUMS
@@ -1 +1 @@
-281224b66ce7ef39daf0f186cda1144250e190b914e64f4f2524e8bf0170a3d18dbc50f204d4ca8d7eaffe183a61f96c92ba6ec4325bacb068272d62cdbcef33 libmatroska-1.4.9.tar.xz
+5c65b903abd2f42e2270749c0570b1c1f7d65f87d7eb6a3f5480af3cee6614c74b3566858f1afe3c71cdea6085c1a114e53b08bfb043691018ee7f23ce4b8ef2 libmatroska-1.5.1.tar.xz
diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
index 66173290cf..e3a5546550 100644
--- a/contrib/src/matroska/rules.mak
+++ b/contrib/src/matroska/rules.mak
@@ -1,6 +1,6 @@
# matroska
-MATROSKA_VERSION := 1.4.9
+MATROSKA_VERSION := 1.5.1
MATROSKA_URL := http://dl.matroska.org/downloads/libmatroska/libmatroska-$(MATROSKA_VERSION).tar.xz
PKGS += matroska
@@ -18,8 +18,6 @@ $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.xz:
libmatroska: libmatroska-$(MATROSKA_VERSION).tar.xz .sum-matroska
$(UNPACK)
- $(APPLY) $(SRC)/matroska/0001-KaxBlock-don-t-reset-potentially-unallocated-memory.patch
- $(APPLY) $(SRC)/matroska/0001-KaxBlock-do-not-attempt-to-use-laced-sizes-that-are-.patch
$(call pkg_static,"libmatroska.pc.in")
$(MOVE)
More information about the vlc-commits
mailing list