From dffc344f3ab79f89b95fc5ff89e46e727b9b1c34 Mon Sep 17 00:00:00 2001 From: hschang Date: Wed, 7 Feb 2018 16:22:23 +0900 Subject: [PATCH] [libdvbsi++] update to 0.3.8 --- ...tor-check-if-header-is-larger-than-descri.patch | 39 ++++++++++++++++++++++ .../libdvbsi++/files/fix_section_len_check.patch | 13 ++++++++ .../libdvbsi++/libdvbsi++_0.3.6.bb | 13 -------- .../libdvbsi++/libdvbsi++_0.3.8.bb | 19 +++++++++++ meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb | 2 +- 5 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 meta-openvuplus/recipes-multimedia/libdvbsi++/files/0001-ac3_descriptor-check-if-header-is-larger-than-descri.patch create mode 100644 meta-openvuplus/recipes-multimedia/libdvbsi++/files/fix_section_len_check.patch delete mode 100644 meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.6.bb create mode 100644 meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.8.bb diff --git a/meta-openvuplus/recipes-multimedia/libdvbsi++/files/0001-ac3_descriptor-check-if-header-is-larger-than-descri.patch b/meta-openvuplus/recipes-multimedia/libdvbsi++/files/0001-ac3_descriptor-check-if-header-is-larger-than-descri.patch new file mode 100644 index 0000000..2180e54 --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/libdvbsi++/files/0001-ac3_descriptor-check-if-header-is-larger-than-descri.patch @@ -0,0 +1,39 @@ +From cb2b7ce505701fd6c10c2700eb1c515f094544e8 Mon Sep 17 00:00:00 2001 +From: Athanasios Oikonomou +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 + diff --git a/meta-openvuplus/recipes-multimedia/libdvbsi++/files/fix_section_len_check.patch b/meta-openvuplus/recipes-multimedia/libdvbsi++/files/fix_section_len_check.patch new file mode 100644 index 0000000..d2ae012 --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/libdvbsi++/files/fix_section_len_check.patch @@ -0,0 +1,13 @@ +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]); + } diff --git a/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.6.bb b/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.6.bb deleted file mode 100644 index 96d9ad0..0000000 --- a/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.6.bb +++ /dev/null @@ -1,13 +0,0 @@ -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 diff --git a/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.8.bb b/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.8.bb new file mode 100644 index 0000000..870222a --- /dev/null +++ b/meta-openvuplus/recipes-multimedia/libdvbsi++/libdvbsi++_0.3.8.bb @@ -0,0 +1,19 @@ +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 diff --git a/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb b/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb index ef89b25..cced0a8 100644 --- a/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb +++ b/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb @@ -233,7 +233,7 @@ DEPENDS += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libgles libvugle RDEPENDS_${PN}_append_vuplus += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libvugles2" , "", d)}" PN = "enigma2" -PR = "r173" +PR = "r174" inherit gitpkgv pythonnative -- 2.7.4