From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- media-libs/libvpx/Manifest | 14 +- ...libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch | 211 +++++++++++++++++++++ media-libs/libvpx/libvpx-1.5.0.ebuild | 1 + media-libs/libvpx/libvpx-1.6.0-r1.ebuild | 1 + media-libs/libvpx/libvpx-1.7.0-r1.ebuild | 131 +++++++++++++ media-libs/libvpx/libvpx-1.7.0.ebuild | 5 +- media-libs/libvpx/libvpx-1.8.0-r1.ebuild | 3 + media-libs/libvpx/libvpx-1.8.0.ebuild | 3 + media-libs/libvpx/libvpx-1.8.1.ebuild | 119 ++++++++++++ 9 files changed, 482 insertions(+), 6 deletions(-) create mode 100644 media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch create mode 100644 media-libs/libvpx/libvpx-1.7.0-r1.ebuild create mode 100644 media-libs/libvpx/libvpx-1.8.1.ebuild (limited to 'media-libs/libvpx') diff --git a/media-libs/libvpx/Manifest b/media-libs/libvpx/Manifest index 1e82a370ea39..73b4aff93724 100644 --- a/media-libs/libvpx/Manifest +++ b/media-libs/libvpx/Manifest @@ -1,19 +1,23 @@ AUX libvpx-1.3.0-sparc-configure.patch 406 BLAKE2B 02b1f0484a9659fdc90eb567db517a8b63f679521ae9ab510bfaa88b9fd5e1430d0eceeb8e4a138b00cb43ac4a1db6451dd29a808367973dc885fe5b9eacd665 SHA512 159ba5577fc0eee3e958740d8607a7570f374a8f64a36f1e7832a126482ec0bb96ba2be451eefdf50d84a412a2be73ae75da3d69da78ec13dfe0e24a14685035 +AUX libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch 8035 BLAKE2B 785a8769741e5af10ce0f18f6ef9f091d1335ca1c8515c9b653d3a177a620a8b3360b7df03f058b63e42259d6e4ccb6863e0ec9acd69886627a222ea3b8beb2d SHA512 b5af677b7f8fc6c61ea1c99c094103549cbe1a0163da70f51d4c34eec40b507a7bf8f84f97ee141a15c33bfaf2a6cb36c572a08465407fb17eb9b6a1364a3819 AUX libvpx-1.8.0-ppc64le-disable-vsx.patch 978 BLAKE2B 6432379ff15f7e8da2b162c8b8f0d9d89c13cb18497b638b3b772aba979533e2abf7a4db0f9f9636e9c44460dc5968cf24f6fe1984a67d7188d27972671469b0 SHA512 d558f7b53d3158bb3f0c67cb0018f484282102fef6267af02a2009e3285d0930d11ed6f846ee8f9e353a25496fe5f2c6bccbab6acd8f472a2b2b1511b57ad360 DIST libvpx-1.5.0.tar.bz2 1906571 BLAKE2B 1e4e2d7ac6ae046d733361d644a9c36b84f03353fd55bc938b064bcba565d943affa6866df4e9c23b3a1120bf34ad660932bad8c9d8e480d42cdf96b4b937d49 SHA512 5a952aa53e539a130d316723d424fa02a8f42a450950d74a16d8abc5df569ba5559b3b09a32140b638d7a0cd54be1c7b0f8306ad286825bc1281f513bb665fc5 DIST libvpx-1.6.0.tar.bz2 1943026 BLAKE2B 1fbea27d73b2120ed807108b8ba09c4118e2d8381fdcbbf8661c5fd664e6272d6c14b73c7b8317b97fa51b212d3ea2429819e0e17adf6afcb8d0f5fb6dd9a68a SHA512 dd753372a156bbf7ceb4090276e5fb32b4c8581c93925dded93efee74153b5eb24ee8c3d8ee6339a6878482f0ecf178a2befeeb36e17eada6c440b48c60e9162 DIST libvpx-1.6.1.tar.bz2 1959534 BLAKE2B 67f73ffd2569bde46db98e7fcb36f7b37d33927fad8c3916ebe1810e63e7aae963bd39ba1f399be079ea4c9f52736f98a603c810f9412643a91166dfb09ed895 SHA512 1a4b009fe1737715c6563a79848126a5859394a5074b1e9cca9bc2e213df90890c15e708040d5f2c96c7c21e268f51e1352ac6911514bf891a4bf3eea154159d DIST libvpx-1.7.0.tar.gz 2679797 BLAKE2B de7992adb517e375c5be2a9facf2b4a73174adcaef11185ed6d3102c2f6b73f378b0d415c5e3a4d915b3a6889bd8b31ba3e8c007a87a433a345ef7696a1dd899 SHA512 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0 DIST libvpx-1.8.0.tar.gz 2879302 BLAKE2B a6113115b4d3668951b084250ca3e9bafeb1a4c54cb0c5516d6d24a88105f13b5b458dd0b57088eddb64deb0096a2023968588cc7dc69aa0cd0799caa71f9fc0 SHA512 77477ec7059de1d90f048c10783b4adce463a84c9c828f125686e533f5bc8c9eeab8a1747df5c928e0869ccf855a9af5608199c8c376a75d35659f719ee870ef +DIST libvpx-1.8.1.tar.gz 2922587 BLAKE2B c9526616f81b6b343c9597f1f0b368f76f8f6b2b5a9e207b2e8f0a2b5e14a49b7e4f61cc88ce8f9b78e04f82149f46de4bd09baa0d45b26942a3e5ca821e8e10 SHA512 615476a929e46befdd4782a39345ce55cd30176ecb2fcd8a875c31694ae2334b395dcab9c5ba58d53ceb572ed0c022d2a3748ca4bbd36092e22b01cf3c9b2e8e DIST libvpx-testdata-1.5.0.tar.bz2 117022525 BLAKE2B d0b5e96694d84d825b874df208dc3b3156ab0d5e9d567e1e05cdc7b88f47126917b84178748f0971ce14d58ee031906b72070bec622983ec56244159b8b759ee SHA512 58abcea159d1f709c2b9b52e8ae381481ed0ee1f43972f5e52d628754844ed23f5f77180a9c3f950a19fd8e2eaec406288d9ec65a42c9d6d080a6948827698bb DIST libvpx-testdata-1.6.0.tar.bz2 121020858 BLAKE2B 93bbaa4514e46b762fbf86d66394b228d62c19906dc79c5c661feedf088d09d4b6c2ac908dc8b1ac4236a801047d5d608b17a8bc0fa5bd5ca0c992cd0729fc7a SHA512 639e229bd97e7a92a29e636f548234a87dbe63673d968cdfbec1faf9ccb0ee2087ad00b0a5bfb1581bea6b17e70bb449e9a046da4d9891f59ec79773ece4294e DIST libvpx-testdata-1.6.1.tar.bz2 158774682 BLAKE2B 0ba1897e015c69cbf98b645cc634f98fdaf58aa814ad2cf93ee1812a38d279a570b856017822db0b21215c0e6d2d069c3f40692317c885ffbc3b59c236a754ba SHA512 9038774a6955cb6664ea664b4d8e08b0e7a2acba85429da9fd84f522bc7a03d57f6d9f1302481136a718507113babbe4786ff7a648130298ad2c0b3cbe8e82ab DIST libvpx-testdata-1.7.0.tar.xz 238790100 BLAKE2B 1d14e794341d35402eaf54d398ebed56b0983908e397ae677737e0f313ea0bfc9c4a39be91765b02a07a8eb9b55529d5f998efcc87b1b493b0e326e02193d982 SHA512 1556345e41674f0846a7419828972ec27c3c37fe270fa1deb45e03665f60ec088d79134aee0d2e27003b130636eeed4a15ea3f701c9d7014f3ca2785467767a8 DIST libvpx-testdata-1.8.0.tar.xz 418337232 BLAKE2B 1336e522f18a8f7812b4e7e4de7b27d32778c38fe902c62a4415a17e857868bfcdcbdcab528617db89e9f57449a486333feccffc4a250bfe79fc460c790071ed SHA512 991066467121614106455522b3651f194b45a37125c1b4e6bade59044756f26d914c95388e3c0bd3dc22159525aa6478df36801767bb7506fa7e77b93c6c2ede -EBUILD libvpx-1.5.0.ebuild 3888 BLAKE2B 3edbc7d114e705d821208a5c9547fccf5c91289ac2875dc594d046609231368b27cd8e1b5db1706111856c911d07e2e889a340a8f8c54ac4d7af157d4c722ca3 SHA512 0cd8cafffc1d6b315726f9ce0f3232dbcb4ca1164cc1191292b6540381680bee9dd2003c38cc6b1d0f14f6404a1b695f467755b99c31e732f6bf86e6c0fd98f2 -EBUILD libvpx-1.6.0-r1.ebuild 3531 BLAKE2B 8249b477e74e648c6de984e83193ff9dd462c7e76b0ce586f45a169105f7b35c8c26f6538b0ad75b1bb1d19c10db03ecc504ef0cd025d9f152edea851b714b46 SHA512 7cfe71249b0ade5bcd8cab71280b957cf36d915b4562316f529b6333b2bd1591d0db5792052de5d99d3334fbb900bc762e996ea9a8f0ee3c1aee1e825e0f46df +EBUILD libvpx-1.5.0.ebuild 3915 BLAKE2B 98f43ae75951e17166aebc7a6c40cde4ac168863c610e2fc60bcb649e08c8c3e7d030fbfb78950e547549baa6a6df6f0611769101984ac64a5367a032a6daef0 SHA512 101877539c05bb97c3234b8aa0c8ed46c4b969b9f0ae32edc70b9034111ccd1ae44a08c7868166bd075f0625cd8ff4147d0d5fcf8c8db52724a2df6c61f01ca7 +EBUILD libvpx-1.6.0-r1.ebuild 3558 BLAKE2B 150582b4051286e64cec38e74eab4018ac92057dd0aca9130ade453fb84b675ba020d82172767640fdc61473b2d7af0a7f4cbab471423d08dcec021d092af84e SHA512 95faa07a5af9756da211420c569dd0b86e914cf46aa1b7bcaf54d36fa08309d845290132d422d86438da29b4c4ef483cc592bc30ae9ca19080897714ff7ca442 EBUILD libvpx-1.6.1.ebuild 3885 BLAKE2B 0bb9632f5447b2c971aaa77814d28b5308f87e06a796f730847c9ab28acf09de2e2cfb2235a8cd9180c4f63b1d12d7b972d95efa914d4afc4800a136885ee56c SHA512 c9dd758c70c7ce7c860a5317e9cfeb4d6ff6b1e5c5ea54f0243a2d32235ee54f5a86224e886407bc8041bb64c80ddbbb2f4aec733efc83dabd3cc35dc16008bc -EBUILD libvpx-1.7.0.ebuild 3842 BLAKE2B e306ae8e04884091c2d3b918a07d6996aa3488cff30dc12a291e05b03c293fa5468795ffd50c864ef7ea6b262fbeba1b052501e9f6229f162df8edc2996fbc91 SHA512 88c0c9638d922700ea87d825d337537e9d2fd4ec589e40792016e4c3e497f7243176b075c120e7fa0e9b9862c3f8ca3db1b8a0f20e7a15581fee83ea8beb2e34 -EBUILD libvpx-1.8.0-r1.ebuild 3317 BLAKE2B 63b57a82320b28284380c603c8fcc1b2c50800c4bc39affe4a3877bed50d5129b32c4e7e18c64ae32cca8045d4fb25984f3d6c686e21f000e99a699cd32495bc SHA512 a4eb1f7938edea9dfd3cd52efae6f39e1f96f700f1f443e906fd35080866b3b6b3fe28c287ba7e8895092ffb64255802e4de5270f8b374205de3b7718b47054c -EBUILD libvpx-1.8.0.ebuild 3882 BLAKE2B 3eca48075feb41dfe6992148854c76269f34e1996202c9661129a92812a55fff4de0cbe4119c4762d4a0fccca35133b8809e0765ad0196fd910078c1fd88ae4b SHA512 520b2958b347e5bd25cb55f469b9ed7bca0d579eff1b4ab380f69a120f127cb2bb620ee37deacd4b12ffaeb0f3ef06455d152b744efe434cb2fd58718c9fee0c +EBUILD libvpx-1.7.0-r1.ebuild 4031 BLAKE2B d6cab663af32978afce7d5a0b980e03c97e54616e3c403336e4ff24a63eac982581a4e4225a1bf84ad9901215ae66f71ac5146a445780ad8468ea0f34301a539 SHA512 5953ac2b45206c732946393642e2e76e8e5879953f085e02f64d5828779a119dc3fb349029d27503bb8b3db08611d5f44730b07ae882219b9c6e65452d6e2b0a +EBUILD libvpx-1.7.0.ebuild 3973 BLAKE2B 54e102f568d08e9ca88b7f3a85ad1238883de4ae8a06fec512b03a259f36da5812222963bad7dbd609e451f4955de8ef232e5f4df5ce2ac93cfc40ba714fd8ba SHA512 33ab3e5fc9a499cd1c1569db1f34bc1c0010f6d594aab04f153a66f1a0f66a1eb720bc10dafa00a7467a81e99e223515bf775b97d89a7d2993fa02d3e31020dc +EBUILD libvpx-1.8.0-r1.ebuild 3449 BLAKE2B 144fc11e58fda1072b202c641f5cbdc410c76b61e84f06058d687f0946aa5453b32842e6609d7abc1fc4da25ee93fb94b079a90e6ea3227261054911232e3480 SHA512 5042b06590b9c773ab8ad5a7a6cf6eaf8c1e2881800beb7c47471b9d8fc362031f9443de23c792399835d68487110156fe3943885b227e1336a227ce3b3b02e2 +EBUILD libvpx-1.8.0.ebuild 4014 BLAKE2B 570a0a597ebdf08e6e07be7cd65f5878a199849ee22a6c19e50c5ff922dc936604287019569b9bda9223225a6d60515d563b7a38e633b4ae59d9cf7bf72a2165 SHA512 26cd790ac6c76bb5203f568118835bb9e9087b9c2c4f130116568ff3fbf5110396af12711e51334a3cfa7ddcc0bb8bccbc34f310b18014e8948f1068cee8bd40 +EBUILD libvpx-1.8.1.ebuild 3387 BLAKE2B 7043498569960ffaaec8a29e4289790af78b856c5b7f49ee4a966d1b6dd8750dbca10dc19ab10fa9a935d2fd655e86988c689ab54ce386dc9e87e5bb5e6a0d3b SHA512 9c5eb382a9706f491892697a1721a12bd6b057b8e91a7fbd8e02e420128ac2ab91d549271924af9d1babc6754407e56911a8b968b44b86ec4deb9b57f3dfa6ed MISC metadata.xml 664 BLAKE2B 78c866b8ee8a4b266156652bd6352d1ad0b7f28c88922dd31868623b1eca6530aab0a391c7264e5f1dffb9c1379adeb3b115846e99e1ab8a2ae1e58f527234ca SHA512 96644cef2185474da831eb928645cb7607216242097e8d1f1b887071817e282e22ae5646583208bfacf4467029b9dc2d3cfb888bba085bbf5b493dc98c3a7ef9 diff --git a/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch b/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch new file mode 100644 index 000000000000..623eccda902d --- /dev/null +++ b/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch @@ -0,0 +1,211 @@ +Backports of + +From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001 +From: kyslov +Date: Fri, 4 Jan 2019 17:04:09 -0800 +Subject: [PATCH] Fix OOB memory access on fuzzed data + +From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 24 Jul 2018 21:36:50 -0700 +Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal + +From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 11 Dec 2018 18:06:20 -0800 +Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf + +From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Tue, 9 Apr 2019 18:37:44 -0700 +Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10 + +From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001 +From: Jerome Jiang +Date: Wed, 23 May 2018 15:43:00 -0700 +Subject: [PATCH] VP8: Fix use-after-free in postproc. + +to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433 + + +--- a/test/decode_api_test.cc ++++ b/test/decode_api_test.cc +@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) { + EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); + } + +-TEST(DecodeAPI, Vp9PeekSI) { ++void TestPeekInfo(const uint8_t *const data, uint32_t data_sz, ++ uint32_t peek_size) { + const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo; ++ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get ++ // to decoder_peek_si_internal on frames of size < 8. ++ if (data_sz >= 8) { ++ vpx_codec_ctx_t dec; ++ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); ++ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM ++ : VPX_CODEC_CORRUPT_FRAME, ++ vpx_codec_decode(&dec, data, data_sz, NULL, 0)); ++ vpx_codec_iter_t iter = NULL; ++ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); ++ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); ++ } ++ ++ // Verify behavior of vpx_codec_peek_stream_info. ++ vpx_codec_stream_info_t si; ++ si.sz = sizeof(si); ++ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, ++ vpx_codec_peek_stream_info(codec, data, data_sz, &si)); ++} ++ ++TEST(DecodeAPI, Vp9PeekStreamInfo) { + // The first 9 bytes are valid and the rest of the bytes are made up. Until + // size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it + // should return VPX_CODEC_CORRUPT_FRAME. +@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) { + }; + + for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) { +- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get +- // to decoder_peek_si_internal on frames of size < 8. +- if (data_sz >= 8) { +- vpx_codec_ctx_t dec; +- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0)); +- EXPECT_EQ( +- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME, +- vpx_codec_decode(&dec, data, data_sz, NULL, 0)); +- vpx_codec_iter_t iter = NULL; +- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter)); +- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); +- } ++ TestPeekInfo(data, data_sz, 10); ++ } ++} ++ ++TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) { ++ // This profile 1 header requires 10.25 bytes, ensure ++ // vpx_codec_peek_stream_info doesn't over read. ++ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53, ++ 0xe9, 0x30, 0x68, 0x53, 0x04 }; + +- // Verify behavior of vpx_codec_peek_stream_info. +- vpx_codec_stream_info_t si; +- si.sz = sizeof(si); +- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK, +- vpx_codec_peek_stream_info(codec, data, data_sz, &si)); ++ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) { ++ TestPeekInfo(profile1_data, data_sz, 11); + } + } + #endif // CONFIG_VP9_DECODER +--- a/third_party/libwebm/mkvparser/mkvparser.cc ++++ b/third_party/libwebm/mkvparser/mkvparser.cc +@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info, + + const long long stop = pos + s.size; + +- Colour* colour = NULL; +- Projection* projection = NULL; ++ std::unique_ptr colour_ptr; ++ std::unique_ptr projection_ptr; + + while (pos < stop) { + long long id, size; +@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info, + if (rate <= 0) + return E_FILE_FORMAT_INVALID; + } else if (id == libwebm::kMkvColour) { +- if (!Colour::Parse(pReader, pos, size, &colour)) ++ Colour* colour = NULL; ++ if (!Colour::Parse(pReader, pos, size, &colour)) { + return E_FILE_FORMAT_INVALID; ++ } else { ++ colour_ptr.reset(colour); ++ } + } else if (id == libwebm::kMkvProjection) { +- if (!Projection::Parse(pReader, pos, size, &projection)) ++ Projection* projection = NULL; ++ if (!Projection::Parse(pReader, pos, size, &projection)) { + return E_FILE_FORMAT_INVALID; ++ } else { ++ projection_ptr.reset(projection); ++ } + } + + pos += size; // consume payload +@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info, + pTrack->m_display_unit = display_unit; + pTrack->m_stereo_mode = stereo_mode; + pTrack->m_rate = rate; +- pTrack->m_colour = colour; +- pTrack->m_projection = projection; ++ pTrack->m_colour = colour_ptr.release(); ++ pTrack->m_projection = projection_ptr.release(); + + pResult = pTrack; + return 0; // success +--- a/vp8/common/postproc.c ++++ b/vp8/common/postproc.c +@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source, + double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065; + int ppl = (int)(level + .5); + +- const MODE_INFO *mode_info_context = cm->show_frame_mi; ++ const MODE_INFO *mode_info_context = cm->mi; + int mbr, mbc; + + /* The pixel thresholds are adjusted according to if or not the macroblock +--- a/vp8/decoder/dboolhuff.h ++++ b/vp8/decoder/dboolhuff.h +@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) { + } + + { +- register int shift = vp8_norm[range]; ++ const unsigned char shift = vp8_norm[(unsigned char)range]; + range <<= shift; + value <<= shift; + count -= shift; +--- a/vp9/vp9_dx_iface.c ++++ b/vp9/vp9_dx_iface.c +@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_internal( + const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si, + int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) { + int intra_only_flag = 0; +- uint8_t clear_buffer[10]; ++ uint8_t clear_buffer[11]; + + if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM; + +@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_internal( + if (profile > PROFILE_0) { + if (!parse_bitdepth_colorspace_sampling(profile, &rb)) + return VPX_CODEC_UNSUP_BITSTREAM; ++ // The colorspace info may cause vp9_read_frame_size() to need 11 ++ // bytes. ++ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM; + } + rb.bit_offset += REF_FRAMES; // refresh_frame_flags + vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); +--- a/vpx_dsp/bitreader.h ++++ b/vpx_dsp/bitreader.h +@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) { + } + + { +- register int shift = vpx_norm[range]; ++ const unsigned char shift = vpx_norm[(unsigned char)range]; + range <<= shift; + value <<= shift; + count -= shift; +--- a/vpx_dsp/bitreader_buffer.c ++++ b/vpx_dsp/bitreader_buffer.c +@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb) { + rb->bit_offset = off + 1; + return bit; + } else { +- rb->error_handler(rb->error_handler_data); ++ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data); + return 0; + } + } diff --git a/media-libs/libvpx/libvpx-1.5.0.ebuild b/media-libs/libvpx/libvpx-1.5.0.ebuild index a7deea01f3c9..700c5256f736 100644 --- a/media-libs/libvpx/libvpx-1.5.0.ebuild +++ b/media-libs/libvpx/libvpx-1.5.0.ebuild @@ -27,6 +27,7 @@ HOMEPAGE="https://www.webmproject.org" LICENSE="BSD" SLOT="0/3" IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs svc test +threads" +RESTRICT="!test? ( test )" RDEPEND="" DEPEND="abi_x86_32? ( dev-lang/yasm ) diff --git a/media-libs/libvpx/libvpx-1.6.0-r1.ebuild b/media-libs/libvpx/libvpx-1.6.0-r1.ebuild index 79d68925dd81..4d34056abc3e 100644 --- a/media-libs/libvpx/libvpx-1.6.0-r1.ebuild +++ b/media-libs/libvpx/libvpx-1.6.0-r1.ebuild @@ -15,6 +15,7 @@ LICENSE="BSD" SLOT="0/4" KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs svc test +threads" +RESTRICT="!test? ( test )" RDEPEND="" DEPEND="abi_x86_32? ( dev-lang/yasm ) diff --git a/media-libs/libvpx/libvpx-1.7.0-r1.ebuild b/media-libs/libvpx/libvpx-1.7.0-r1.ebuild new file mode 100644 index 000000000000..ecb112e13f96 --- /dev/null +++ b/media-libs/libvpx/libvpx-1.7.0-r1.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +inherit toolchain-funcs multilib-minimal + +# To create a new testdata tarball: +# 1. Unpack source tarbll or checkout git tag +# 2. export LIBVPX_TEST_DATA_PATH=libvpx-testdata +# 3. configure --enable-unit-tests --enable-vp9-highbitdepth +# 4. make testdata +# 5. tar -cjf libvpx-testdata-${MY_PV}.tar.bz2 libvpx-testdata + +LIBVPX_TESTDATA_VER=1.7.0 + +DESCRIPTION="WebM VP8 and VP9 Codec SDK" +HOMEPAGE="https://www.webmproject.org" +SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )" + +LICENSE="BSD" +SLOT="0/5" +KEYWORDS="amd64 ~arm arm64 ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs svc test +threads" + +REQUIRED_USE=" + cpu_flags_x86_sse2? ( cpu_flags_x86_mmx ) + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 ) + test? ( threads ) +" + +# Disable test phase when USE="-test" +RESTRICT="!test? ( test )" + +RDEPEND="" +DEPEND="abi_x86_32? ( dev-lang/yasm ) + abi_x86_64? ( dev-lang/yasm ) + abi_x86_x32? ( dev-lang/yasm ) + x86-fbsd? ( dev-lang/yasm ) + amd64-fbsd? ( dev-lang/yasm ) + doc? ( + app-doc/doxygen + dev-lang/php + ) +" + +PATCHES=( + "${FILESDIR}"/libvpx-1.3.0-sparc-configure.patch # 501010 + "${FILESDIR}"/${P}-CVE-2019-9232_9325_9371_9433.patch +) + +src_configure() { + # https://bugs.gentoo.org/show_bug.cgi?id=384585 + # https://bugs.gentoo.org/show_bug.cgi?id=465988 + # copied from php-pear-r1.eclass + addpredict /usr/share/snmp/mibs/.index + addpredict /var/lib/net-snmp/ + addpredict /var/lib/net-snmp/mib_indexes + addpredict /session_mm_cli0.sem + multilib-minimal_src_configure +} + +multilib_src_configure() { + unset CODECS #357487 + + # #498364: sse doesn't work without sse2 enabled, + local myconfargs=( + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}"/usr/$(get_libdir) + --enable-pic + --enable-vp8 + --enable-vp9 + --enable-shared + --extra-cflags="${CFLAGS}" + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_mmx mmx) + $(use_enable postproc) + $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable cpu_flags_x86_sse3 sse3) + $(use_enable cpu_flags_x86_sse4_1 sse4_1) + $(use_enable cpu_flags_x86_ssse3 ssse3) + $(use_enable svc experimental) $(use_enable svc spatial-svc) + $(use_enable static-libs static) + $(use_enable test unit-tests) + $(use_enable threads multithread) + $(use_enable highbitdepth vp9-highbitdepth) + ) + + # let the build system decide which AS to use (it honours $AS but + # then feeds it with yasm flags without checking...) #345161 + tc-export AS + case "${CHOST}" in + i?86*) export AS=yasm;; + x86_64*) export AS=yasm;; + esac + + # powerpc toolchain is not recognized anymore, #694368 + [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu ) + + # Build with correct toolchain. + tc-export CC CXX AR NM + # Link with gcc by default, the build system should override this if needed. + export LD="${CC}" + + if multilib_is_native_abi; then + myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) ) + else + # not needed for multilib and will be overwritten anyway. + myconfargs+=( --disable-examples --disable-install-docs --disable-docs ) + fi + + "${S}"/configure "${myconfargs[@]}" +} + +multilib_src_compile() { + # build verbose by default and do not build examples that will not be installed + emake verbose=yes GEN_EXAMPLES= +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH="${BUILD_DIR}" + local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" + emake verbose=yes GEN_EXAMPLES= test +} + +multilib_src_install() { + emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install + multilib_is_native_abi && use doc && dodoc -r docs/html +} diff --git a/media-libs/libvpx/libvpx-1.7.0.ebuild b/media-libs/libvpx/libvpx-1.7.0.ebuild index 877d221cedb9..ed1286201bc2 100644 --- a/media-libs/libvpx/libvpx-1.7.0.ebuild +++ b/media-libs/libvpx/libvpx-1.7.0.ebuild @@ -20,7 +20,7 @@ SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar. LICENSE="BSD" SLOT="0/5" -KEYWORDS="amd64 arm arm64 ia64 ~ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="amd64 arm arm64 ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs svc test +threads" REQUIRED_USE=" @@ -95,6 +95,9 @@ multilib_src_configure() { x86_64*) export AS=yasm;; esac + # powerpc toolchain is not recognized anymore, #694368 + [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu ) + # Build with correct toolchain. tc-export CC CXX AR NM # Link with gcc by default, the build system should override this if needed. diff --git a/media-libs/libvpx/libvpx-1.8.0-r1.ebuild b/media-libs/libvpx/libvpx-1.8.0-r1.ebuild index 9c2b048cea49..f0bd95847496 100644 --- a/media-libs/libvpx/libvpx-1.8.0-r1.ebuild +++ b/media-libs/libvpx/libvpx-1.8.0-r1.ebuild @@ -84,6 +84,9 @@ multilib_src_configure() { x86_64*) export AS=yasm;; esac + # powerpc toolchain is not recognized anymore, #694368 + [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu ) + # Build with correct toolchain. tc-export CC CXX AR NM # Link with gcc by default, the build system should override this if needed. diff --git a/media-libs/libvpx/libvpx-1.8.0.ebuild b/media-libs/libvpx/libvpx-1.8.0.ebuild index 5d7954ec89c1..a05ed4eb72ff 100644 --- a/media-libs/libvpx/libvpx-1.8.0.ebuild +++ b/media-libs/libvpx/libvpx-1.8.0.ebuild @@ -96,6 +96,9 @@ multilib_src_configure() { x86_64*) export AS=yasm;; esac + # powerpc toolchain is not recognized anymore, #694368 + [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu ) + # Build with correct toolchain. tc-export CC CXX AR NM # Link with gcc by default, the build system should override this if needed. diff --git a/media-libs/libvpx/libvpx-1.8.1.ebuild b/media-libs/libvpx/libvpx-1.8.1.ebuild new file mode 100644 index 000000000000..6c41b598eb92 --- /dev/null +++ b/media-libs/libvpx/libvpx-1.8.1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +inherit toolchain-funcs multilib-minimal + +# To create a new testdata tarball: +# 1. Unpack source tarbll or checkout git tag +# 2. export LIBVPX_TEST_DATA_PATH=libvpx-testdata +# 3. configure --enable-unit-tests --enable-vp9-highbitdepth +# 4. make testdata +# 5. tar -cjf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata + +LIBVPX_TESTDATA_VER=1.8.0 + +DESCRIPTION="WebM VP8 and VP9 Codec SDK" +HOMEPAGE="https://www.webmproject.org" +SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )" + +LICENSE="BSD" +SLOT="0/6" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc +highbitdepth postproc static-libs svc test +threads" + +REQUIRED_USE="test? ( threads )" + +# Disable test phase when USE="-test" +RESTRICT="!test? ( test )" + +RDEPEND="" +DEPEND="abi_x86_32? ( dev-lang/yasm ) + abi_x86_64? ( dev-lang/yasm ) + abi_x86_x32? ( dev-lang/yasm ) + x86-fbsd? ( dev-lang/yasm ) + amd64-fbsd? ( dev-lang/yasm ) + doc? ( + app-doc/doxygen + dev-lang/php + ) +" + +PATCHES=( + "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010 +) + +src_configure() { + # https://bugs.gentoo.org/show_bug.cgi?id=384585 + # https://bugs.gentoo.org/show_bug.cgi?id=465988 + # copied from php-pear-r1.eclass + addpredict /usr/share/snmp/mibs/.index + addpredict /var/lib/net-snmp/ + addpredict /var/lib/net-snmp/mib_indexes + addpredict /session_mm_cli0.sem + multilib-minimal_src_configure +} + +multilib_src_configure() { + unset CODECS #357487 + + # #498364: sse doesn't work without sse2 enabled, + local myconfargs=( + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}"/usr/$(get_libdir) + --enable-pic + --enable-vp8 + --enable-vp9 + --enable-shared + --extra-cflags="${CFLAGS}" + $(use_enable postproc) + $(use_enable svc experimental) + $(use_enable static-libs static) + $(use_enable test unit-tests) + $(use_enable threads multithread) + $(use_enable highbitdepth vp9-highbitdepth) + ) + + # let the build system decide which AS to use (it honours $AS but + # then feeds it with yasm flags without checking...) #345161 + tc-export AS + case "${CHOST}" in + i?86*) export AS=yasm;; + x86_64*) export AS=yasm;; + esac + + # powerpc toolchain is not recognized anymore, #694368 + [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu ) + + # Build with correct toolchain. + tc-export CC CXX AR NM + # Link with gcc by default, the build system should override this if needed. + export LD="${CC}" + + if multilib_is_native_abi; then + myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) ) + else + # not needed for multilib and will be overwritten anyway. + myconfargs+=( --disable-examples --disable-install-docs --disable-docs ) + fi + + echo "${S}"/configure "${myconfargs[@]}" >&2 + "${S}"/configure "${myconfargs[@]}" +} + +multilib_src_compile() { + # build verbose by default and do not build examples that will not be installed + emake verbose=yes GEN_EXAMPLES= +} + +multilib_src_test() { + local -x LD_LIBRARY_PATH="${BUILD_DIR}" + local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" + emake verbose=yes GEN_EXAMPLES= test +} + +multilib_src_install() { + emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install + multilib_is_native_abi && use doc && dodoc -r docs/html +} -- cgit v1.2.3