diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-08-16 16:04:35 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-08-17 09:21:11 +0200 |
commit | 7ad1aec3ede9b5b07bcba40a86528eb669dd42cd (patch) | |
tree | 7bfa5436b67f8cc19df4d97ee227c0d5a76e66f8 /meta-oe/recipes-multimedia | |
parent | ffd6c31cb4beea4edf1b70864b6894a692aab596 (diff) | |
download | meta-openembedded-7ad1aec3ede9b5b07bcba40a86528eb669dd42cd.tar.gz |
libvpx 0.9.5: import from OE rev e02237d7e46e60fbd9eb4a05a308e6adcf916ebb
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-multimedia')
4 files changed, 168 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/webm/libvpx.inc b/meta-oe/recipes-multimedia/webm/libvpx.inc new file mode 100644 index 000000000..76e319f77 --- /dev/null +++ b/meta-oe/recipes-multimedia/webm/libvpx.inc | |||
@@ -0,0 +1,38 @@ | |||
1 | DESCRIPTION = "vpx Multi-Format Codec SDK" | ||
2 | LICENSE = "BSD" | ||
3 | |||
4 | INC_PR = "r0" | ||
5 | |||
6 | SRC_URI = "http://webm.googlecode.com/files/libvpx-v${PV}.tar.bz2" | ||
7 | S = "${WORKDIR}/libvpx-v${PV}" | ||
8 | |||
9 | # ffmpeg links with this and fails | ||
10 | # sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4' | ||
11 | ARM_INSTRUCTION_SET = "arm" | ||
12 | |||
13 | CFLAGS += "-fPIC" | ||
14 | |||
15 | export CC | ||
16 | export LD = "${CC}" | ||
17 | |||
18 | VPXTARGET_armv5te = "armv5te-linux-gcc" | ||
19 | VPXTARGET_armv6 = "armv6-linux-gcc" | ||
20 | VPXTARGET_armv7a = "armv7-linux-gcc" | ||
21 | VPXTARGET ?= "generic-gnu" | ||
22 | |||
23 | CONFIGUREOPTS = " \ | ||
24 | --target=${VPXTARGET} \ | ||
25 | --enable-vp8 \ | ||
26 | --enable-libs \ | ||
27 | --disable-install-docs \ | ||
28 | " | ||
29 | do_configure() { | ||
30 | ${S}/configure ${CONFIGUREOPTS} | ||
31 | } | ||
32 | do_compile() { | ||
33 | oe_runmake | ||
34 | } | ||
35 | do_install() { | ||
36 | oe_runmake install DESTDIR=${D} | ||
37 | } | ||
38 | |||
diff --git a/meta-oe/recipes-multimedia/webm/libvpx/CVE-2010-4203.patch b/meta-oe/recipes-multimedia/webm/libvpx/CVE-2010-4203.patch new file mode 100644 index 000000000..37f5108a5 --- /dev/null +++ b/meta-oe/recipes-multimedia/webm/libvpx/CVE-2010-4203.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From: John Koleszar <jkoleszar@google.com> | ||
2 | Date: Thu, 4 Nov 2010 20:59:26 +0000 (-0400) | ||
3 | Subject: fix integer promotion bug in partition size check | ||
4 | X-Git-Url: https://review.webmproject.org/gitweb?p=libvpx.git;a=commitdiff_plain;h=9fb80f7170ec48e23c3c7b477149eeb37081c699 | ||
5 | |||
6 | fix integer promotion bug in partition size check | ||
7 | |||
8 | The check '(user_data_end - partition < partition_size)' must be | ||
9 | evaluated as a signed comparison, but because partition_size was | ||
10 | unsigned, the LHS was promoted to unsigned, causing an incorrect | ||
11 | result on 32-bit. Instead, check the upper and lower bounds of | ||
12 | the segment separately. | ||
13 | |||
14 | Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06 | ||
15 | --- | ||
16 | |||
17 | diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c | ||
18 | index 2d81d61..f5e49a1 100644 | ||
19 | --- a/vp8/decoder/decodframe.c | ||
20 | +++ b/vp8/decoder/decodframe.c | ||
21 | @@ -462,7 +462,8 @@ static void setup_token_decoder(VP8D_COMP *pbi, | ||
22 | partition_size = user_data_end - partition; | ||
23 | } | ||
24 | |||
25 | - if (user_data_end - partition < partition_size) | ||
26 | + if (partition + partition_size > user_data_end | ||
27 | + || partition + partition_size < partition) | ||
28 | vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, | ||
29 | "Truncated packet or corrupt partition " | ||
30 | "%d length", i + 1); | ||
31 | @@ -580,7 +581,8 @@ int vp8_decode_frame(VP8D_COMP *pbi) | ||
32 | (data[0] | (data[1] << 8) | (data[2] << 16)) >> 5; | ||
33 | data += 3; | ||
34 | |||
35 | - if (data_end - data < first_partition_length_in_bytes) | ||
36 | + if (data + first_partition_length_in_bytes > data_end | ||
37 | + || data + first_partition_length_in_bytes < data) | ||
38 | vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, | ||
39 | "Truncated packet or corrupt partition 0 length"); | ||
40 | vp8_setup_version(pc); | ||
41 | diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c | ||
42 | index e7e5356..f0adf5b 100644 | ||
43 | --- a/vp8/vp8_dx_iface.c | ||
44 | +++ b/vp8/vp8_dx_iface.c | ||
45 | @@ -253,8 +253,11 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data, | ||
46 | unsigned int data_sz, | ||
47 | vpx_codec_stream_info_t *si) | ||
48 | { | ||
49 | - | ||
50 | vpx_codec_err_t res = VPX_CODEC_OK; | ||
51 | + | ||
52 | + if(data + data_sz <= data) | ||
53 | + res = VPX_CODEC_INVALID_PARAM; | ||
54 | + else | ||
55 | { | ||
56 | /* Parse uncompresssed part of key frame header. | ||
57 | * 3 bytes:- including version, frame type and an offset | ||
58 | @@ -331,7 +334,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx, | ||
59 | |||
60 | ctx->img_avail = 0; | ||
61 | |||
62 | - /* Determine the stream parameters */ | ||
63 | + /* Determine the stream parameters. Note that we rely on peek_si to | ||
64 | + * validate that we have a buffer that does not wrap around the top | ||
65 | + * of the heap. | ||
66 | + */ | ||
67 | if (!ctx->si.h) | ||
68 | res = ctx->base.iface->dec.peek_si(data, data_sz, &ctx->si); | ||
69 | |||
diff --git a/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch b/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch new file mode 100644 index 000000000..1bf863dfa --- /dev/null +++ b/meta-oe/recipes-multimedia/webm/libvpx/libvpx-configure-support-blank-prefix.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream: not yet | ||
2 | |||
3 | Fix configure to accept "--prefix=" (a blank prefix). | ||
4 | |||
5 | --- libvpx-0.9.1/build/make/configure.sh.orig 2010-06-17 09:08:56.000000000 -0400 | ||
6 | +++ libvpx-0.9.1/build/make/configure.sh 2010-09-23 14:27:48.000000000 -0400 | ||
7 | @@ -444,6 +444,8 @@ | ||
8 | ;; | ||
9 | --prefix=*) | ||
10 | prefix="${optval}" | ||
11 | + # Distinguish between "prefix not set" and "prefix set to ''" | ||
12 | + prefixset=1 | ||
13 | ;; | ||
14 | --libdir=*) | ||
15 | libdir="${optval}" | ||
16 | @@ -471,13 +473,23 @@ | ||
17 | |||
18 | |||
19 | post_process_common_cmdline() { | ||
20 | - prefix="${prefix:-/usr/local}" | ||
21 | + if [ "$prefixset" != "1" ] | ||
22 | + then | ||
23 | + prefix=/usr/local | ||
24 | + fi | ||
25 | + | ||
26 | + # Strip trailing slash | ||
27 | prefix="${prefix%/}" | ||
28 | + | ||
29 | libdir="${libdir:-${prefix}/lib}" | ||
30 | libdir="${libdir%/}" | ||
31 | - if [ "${libdir#${prefix}}" = "${libdir}" ]; then | ||
32 | - die "Libdir ${libdir} must be a subdirectory of ${prefix}" | ||
33 | - fi | ||
34 | + | ||
35 | + case "$libdir" in | ||
36 | + "${prefix}/"*) ;; | ||
37 | + *) | ||
38 | + die "Libdir ${libdir} must be a subdirectory of ${prefix}" | ||
39 | + ;; | ||
40 | + esac | ||
41 | } | ||
42 | |||
43 | |||
diff --git a/meta-oe/recipes-multimedia/webm/libvpx_0.9.5.bb b/meta-oe/recipes-multimedia/webm/libvpx_0.9.5.bb new file mode 100644 index 000000000..223652489 --- /dev/null +++ b/meta-oe/recipes-multimedia/webm/libvpx_0.9.5.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | require libvpx.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6e8dee932c26f2dab503abf70c96d8bb" | ||
4 | |||
5 | PR = "${INC_PR}.0" | ||
6 | |||
7 | SRC_URI += "file://libvpx-configure-support-blank-prefix.patch \ | ||
8 | file://CVE-2010-4203.patch \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[md5sum] = "4bf2f2c76700202c1fe9201fcb0680e3" | ||
12 | SRC_URI[sha256sum] = "2e93968afcded113a7e218de047feecf6659a089058803a9e40fb687de5f9bfa" | ||
13 | |||
14 | CONFIGUREOPTS += " \ | ||
15 | --prefix=${prefix} \ | ||
16 | --libdir=${libdir} \ | ||
17 | " | ||
18 | |||