--- /dev/null
+From cb2b7ce505701fd6c10c2700eb1c515f094544e8 Mon Sep 17 00:00:00 2001
+From: Athanasios Oikonomou <athoik@gmail.com>
+Date: Sat, 18 Nov 2017 07:57:35 +0200
+Subject: [PATCH] ac3_descriptor: check if header is larger than descriptor
+
+It seems another broadcaster got it wrong.
+
+6A Tag 0x6A: AC-3_descriptor
+02 Tag Length: 0x02
+CF 00
+
+In above case the descriptor length is 2 and header lenght is 3.
+The ASSERT_MIN_DLEN fails and ac3 fails to parse.
+Set sane defaults in this case too.
+
+diff --git a/src/ac3_descriptor.cpp b/src/ac3_descriptor.cpp
+index c7b28b2..fec8c31 100644
+--- a/src/ac3_descriptor.cpp
++++ b/src/ac3_descriptor.cpp
+@@ -31,6 +31,16 @@ Ac3Descriptor::Ac3Descriptor(const uint8_t * const buffer) : Descriptor(buffer)
+ asvcFlag = (buffer[2] >> 4) & 0x01;
+
+ size_t headerLength = 1 + ac3TypeFlag + bsidFlag + mainidFlag + asvcFlag;
++
++ // broadcasters got it wrong again...
++ if (headerLength > descriptorLength) {
++ ac3TypeFlag = 0;
++ bsidFlag = 0;
++ mainidFlag = 0;
++ asvcFlag = 0;
++ return;
++ }
++
+ ASSERT_MIN_DLEN(headerLength);
+
+ size_t i = 3;
+--
+2.1.4
+
--- /dev/null
+diff --git a/src/time_date_section.cpp b/src/time_date_section.cpp
+index f0e6cf6..97ac02a 100644 (file)
+--- a/src/time_date_section.cpp
++++ b/src/time_date_section.cpp
+@@ -15,7 +15,7 @@
+
+ TimeAndDateSection::TimeAndDateSection(const uint8_t * const buffer) : ShortSection(buffer)
+ {
+- if (sectionLength > 8) {
++ if (sectionLength >= 5) {
+ utcTimeMjd = UINT16(&buffer[3]);
+ utcTimeBcd = (buffer[5] << 16) | UINT16(&buffer[6]);
+ }
+++ /dev/null
-SUMMARY = "C++ parsing library for Service Information (SI) in DVB systems"
-AUTHOR = "Andreas Oberritter"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
-PR = "r2"
-
-SRC_URI = "http://www.saftware.de/${PN}/${P}.tar.bz2"
-SRC_URI += "file://transport_protocol_descriptor.patch"
-SRC_URI[md5sum] = "4e9fb95c3ab8bb31ff051ed1aa98c8c5"
-SRC_URI[sha256sum] = "7f9a8fc7bed9372784ecb101fc45042dcb36dcd4949c57aa524365366f71ebf2"
-
-inherit autotools pkgconfig
--- /dev/null
+SUMMARY = "C++ parsing library for Service Information (SI) in DVB systems"
+AUTHOR = "Andreas Oberritter"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+PR = "r3"
+
+BRANCH = "master"
+SRCREV = "ff57e585c47fd62b484d0a8f96fe4f020f5840e3"
+
+SRC_URI = "git://git.opendreambox.org/git/obi/libdvbsi++.git;branch=${BRANCH};tag=${SRCREV} \
+ file://transport_protocol_descriptor.patch \
+ file://fix_section_len_check.patch \
+ file://0001-ac3_descriptor-check-if-header-is-larger-than-descri.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
RDEPENDS_${PN}_append_vuplus += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libvugles2" , "", d)}"
PN = "enigma2"
-PR = "r173"
+PR = "r174"
inherit gitpkgv pythonnative