summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2017-04-04 08:41:32 -0700
committerMSe <mse1969@posteo.de>2017-06-09 17:48:20 +0200
commitf7012bbf5aba5b85234e213cc197ef943fbd1016 (patch)
treebd6f13a99b5437dc374c9356bc4ca5b72623110e
parentd50cb54886c76b0da57b26d022c057bf6559ed29 (diff)
downloadandroid_external_libvpx-f7012bbf5aba5b85234e213cc197ef943fbd1016.tar.gz
android_external_libvpx-f7012bbf5aba5b85234e213cc197ef943fbd1016.tar.bz2
android_external_libvpx-f7012bbf5aba5b85234e213cc197ef943fbd1016.zip
Limit vpx decoder to 4K framesreplicant-6.0-0003replicant-6.0-0002
Bug: 34360591 AOSP-Change-Id: If66c3498b9a7052219af2dcaa2ef33e1408a8587 (cherry picked from commit 8c714fb5bb5199f6072595c905d226b6f2e858c0) CVE-2017-0641 Change-Id: I26eb203a5556d52d6857117420daf286d2dd10ff
-rw-r--r--config/arm-neon/vpx_config.asm2
-rw-r--r--config/arm-neon/vpx_config.c2
-rw-r--r--config/arm-neon/vpx_config.h4
-rw-r--r--config/arm/vpx_config.asm2
-rw-r--r--config/arm/vpx_config.c2
-rw-r--r--config/arm/vpx_config.h4
-rw-r--r--config/arm64/vpx_config.asm2
-rw-r--r--config/arm64/vpx_config.c2
-rw-r--r--config/arm64/vpx_config.h4
-rw-r--r--config/generic/vpx_config.asm2
-rw-r--r--config/generic/vpx_config.c2
-rw-r--r--config/generic/vpx_config.h4
-rw-r--r--config/mips32-dspr2/vpx_config.c2
-rw-r--r--config/mips32-dspr2/vpx_config.h4
-rw-r--r--config/mips32/vpx_config.c2
-rw-r--r--config/mips32/vpx_config.h4
-rw-r--r--config/mips64/vpx_config.c2
-rw-r--r--config/mips64/vpx_config.h4
-rw-r--r--config/x86/vpx_config.asm2
-rw-r--r--config/x86/vpx_config.c2
-rw-r--r--config/x86/vpx_config.h4
-rw-r--r--config/x86_64/vpx_config.asm2
-rw-r--r--config/x86_64/vpx_config.c2
-rw-r--r--config/x86_64/vpx_config.h4
-rwxr-xr-xgenerate_config.sh2
25 files changed, 43 insertions, 25 deletions
diff --git a/config/arm-neon/vpx_config.asm b/config/arm-neon/vpx_config.asm
index 6f03266..112e698 100644
--- a/config/arm-neon/vpx_config.asm
+++ b/config/arm-neon/vpx_config.asm
@@ -82,7 +82,7 @@
.equ CONFIG_COEFFICIENT_RANGE_CHECKING , 0
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm-neon/vpx_config.c b/config/arm-neon/vpx_config.c
index 48dd606..0eb0a30 100644
--- a/config/arm-neon/vpx_config.c
+++ b/config/arm-neon/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=armv7-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=armv7-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm-neon/vpx_config.h b/config/arm-neon/vpx_config.h
index 8d02c25..318be27 100644
--- a/config/arm-neon/vpx_config.h
+++ b/config/arm-neon/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/arm/vpx_config.asm b/config/arm/vpx_config.asm
index 2a69621..3c37cac 100644
--- a/config/arm/vpx_config.asm
+++ b/config/arm/vpx_config.asm
@@ -82,7 +82,7 @@
.equ CONFIG_COEFFICIENT_RANGE_CHECKING , 0
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm/vpx_config.c b/config/arm/vpx_config.c
index a45c0d2..415043c 100644
--- a/config/arm/vpx_config.c
+++ b/config/arm/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=armv6-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=armv6-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm/vpx_config.h b/config/arm/vpx_config.h
index 62b6285..69ffbba 100644
--- a/config/arm/vpx_config.h
+++ b/config/arm/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/arm64/vpx_config.asm b/config/arm64/vpx_config.asm
index b6c1a52..9499c21 100644
--- a/config/arm64/vpx_config.asm
+++ b/config/arm64/vpx_config.asm
@@ -82,7 +82,7 @@
.equ CONFIG_COEFFICIENT_RANGE_CHECKING , 0
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/arm64/vpx_config.c b/config/arm64/vpx_config.c
index 50e1a4b..ff91217 100644
--- a/config/arm64/vpx_config.c
+++ b/config/arm64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--force-target=armv8-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--force-target=armv8-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/arm64/vpx_config.h b/config/arm64/vpx_config.h
index fb0eabc..d09ffe3 100644
--- a/config/arm64/vpx_config.h
+++ b/config/arm64/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/generic/vpx_config.asm b/config/generic/vpx_config.asm
index b684cd2..911098e 100644
--- a/config/generic/vpx_config.asm
+++ b/config/generic/vpx_config.asm
@@ -82,7 +82,7 @@
.equ CONFIG_COEFFICIENT_RANGE_CHECKING , 0
.equ CONFIG_VP9_HIGHBITDEPTH , 0
.equ CONFIG_EXPERIMENTAL , 0
-.equ CONFIG_SIZE_LIMIT , 0
+.equ CONFIG_SIZE_LIMIT , 1
.equ CONFIG_SPATIAL_SVC , 0
.equ CONFIG_FP_MB_STATS , 0
.equ CONFIG_EMULATE_HARDWARE , 0
diff --git a/config/generic/vpx_config.c b/config/generic/vpx_config.c
index 269eb82..c6d3e14 100644
--- a/config/generic/vpx_config.c
+++ b/config/generic/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/generic/vpx_config.h b/config/generic/vpx_config.h
index 9cdca1f..362c7ef 100644
--- a/config/generic/vpx_config.h
+++ b/config/generic/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips32-dspr2/vpx_config.c b/config/mips32-dspr2/vpx_config.c
index b2f14a3..1aa0024 100644
--- a/config/mips32-dspr2/vpx_config.c
+++ b/config/mips32-dspr2/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips32-linux-gcc --enable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips32-linux-gcc --enable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips32-dspr2/vpx_config.h b/config/mips32-dspr2/vpx_config.h
index f0a0556..037029b 100644
--- a/config/mips32-dspr2/vpx_config.h
+++ b/config/mips32-dspr2/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips32/vpx_config.c b/config/mips32/vpx_config.c
index 81edcc9..d3b127f 100644
--- a/config/mips32/vpx_config.c
+++ b/config/mips32/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips32-linux-gcc --disable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips32-linux-gcc --disable-dspr2 --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips32/vpx_config.h b/config/mips32/vpx_config.h
index 1bc7afa..37cfb67 100644
--- a/config/mips32/vpx_config.h
+++ b/config/mips32/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/mips64/vpx_config.c b/config/mips64/vpx_config.c
index 3b3bb49..95b2a2a 100644
--- a/config/mips64/vpx_config.c
+++ b/config/mips64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=mips64-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=mips64-linux-gcc --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/mips64/vpx_config.h b/config/mips64/vpx_config.h
index f19731b..6151c37 100644
--- a/config/mips64/vpx_config.h
+++ b/config/mips64/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/x86/vpx_config.asm b/config/x86/vpx_config.asm
index 2b7f1cc..0e4286f 100644
--- a/config/x86/vpx_config.asm
+++ b/config/x86/vpx_config.asm
@@ -79,7 +79,7 @@
%define CONFIG_COEFFICIENT_RANGE_CHECKING 0
%define CONFIG_VP9_HIGHBITDEPTH 0
%define CONFIG_EXPERIMENTAL 0
-%define CONFIG_SIZE_LIMIT 0
+%define CONFIG_SIZE_LIMIT 1
%define CONFIG_SPATIAL_SVC 0
%define CONFIG_FP_MB_STATS 0
%define CONFIG_EMULATE_HARDWARE 0
diff --git a/config/x86/vpx_config.c b/config/x86/vpx_config.c
index 4b7c558..77a3864 100644
--- a/config/x86/vpx_config.c
+++ b/config/x86/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=x86-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=x86-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/x86/vpx_config.h b/config/x86/vpx_config.h
index 634c67b..30954fd 100644
--- a/config/x86/vpx_config.h
+++ b/config/x86/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/config/x86_64/vpx_config.asm b/config/x86_64/vpx_config.asm
index 6f0800b..38699c1 100644
--- a/config/x86_64/vpx_config.asm
+++ b/config/x86_64/vpx_config.asm
@@ -79,7 +79,7 @@
%define CONFIG_COEFFICIENT_RANGE_CHECKING 0
%define CONFIG_VP9_HIGHBITDEPTH 0
%define CONFIG_EXPERIMENTAL 0
-%define CONFIG_SIZE_LIMIT 0
+%define CONFIG_SIZE_LIMIT 1
%define CONFIG_SPATIAL_SVC 0
%define CONFIG_FP_MB_STATS 0
%define CONFIG_EMULATE_HARDWARE 0
diff --git a/config/x86_64/vpx_config.c b/config/x86_64/vpx_config.c
index 2561717..9aa0640 100644
--- a/config/x86_64/vpx_config.c
+++ b/config/x86_64/vpx_config.c
@@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=x86_64-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect";
+static const char* const cfg = "--target=x86_64-linux-gcc --disable-sse4_1 --disable-avx --disable-avx2 --as=yasm --enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072";
const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/config/x86_64/vpx_config.h b/config/x86_64/vpx_config.h
index 8796347..687b02c 100644
--- a/config/x86_64/vpx_config.h
+++ b/config/x86_64/vpx_config.h
@@ -91,8 +91,10 @@
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_EXPERIMENTAL 0
-#define CONFIG_SIZE_LIMIT 0
+#define CONFIG_SIZE_LIMIT 1
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
+#define DECODE_WIDTH_LIMIT 4096
+#define DECODE_HEIGHT_LIMIT 3072
#endif /* VPX_CONFIG_H */
diff --git a/generate_config.sh b/generate_config.sh
index 6c6adae..56c7994 100755
--- a/generate_config.sh
+++ b/generate_config.sh
@@ -147,7 +147,7 @@ cp -R $LIBVPX_SRC_DIR $TEMP_DIR
cd $TEMP_DIR
echo "Generate config files."
-all_platforms="--enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect"
+all_platforms="--enable-external-build --enable-realtime-only --enable-pic --disable-runtime-cpu-detect --disable-install-docs --size-limit=4096x3072"
intel="--disable-sse4_1 --disable-avx --disable-avx2 --as=yasm"
gen_config_files x86 "--target=x86-linux-gcc ${intel} ${all_platforms}"
gen_config_files x86_64 "--target=x86_64-linux-gcc ${intel} ${all_platforms}"