summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-14 03:17:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-14 03:17:52 +0100
commit7acee6654ccdbadea62e700970f789478febaa0c (patch)
treea59f3587e7d40879887d568789e5106d94981d3a
parente1631f8ebe9a8f2a9cca85d60160b9be94eb63f3 (diff)
downloadffmpeg-streaming-7acee6654ccdbadea62e700970f789478febaa0c.zip
ffmpeg-streaming-7acee6654ccdbadea62e700970f789478febaa0c.tar.gz
mpeg12data: increase size of ff_mpeg1_default_intra_matrix to prevent harmless overreads from crashing
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12data.c2
-rw-r--r--libavcodec/mpeg12data.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12data.c b/libavcodec/mpeg12data.c
index d26c5da..e8c4a5d 100644
--- a/libavcodec/mpeg12data.c
+++ b/libavcodec/mpeg12data.c
@@ -27,7 +27,7 @@
#include "mpeg12data.h"
-const uint16_t ff_mpeg1_default_intra_matrix[64] = {
+const uint16_t ff_mpeg1_default_intra_matrix[256] = {
8, 16, 19, 22, 26, 27, 29, 34,
16, 16, 22, 24, 27, 29, 34, 37,
19, 22, 26, 27, 29, 34, 34, 38,
diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h
index 0e289b2..65b9485 100644
--- a/libavcodec/mpeg12data.h
+++ b/libavcodec/mpeg12data.h
@@ -32,7 +32,7 @@
#include "libavutil/rational.h"
#include "rl.h"
-extern const uint16_t ff_mpeg1_default_intra_matrix[64];
+extern const uint16_t ff_mpeg1_default_intra_matrix[];
extern const uint16_t ff_mpeg1_default_non_intra_matrix[64];
extern const uint16_t ff_mpeg12_vlc_dc_lum_code[12];
OpenPOWER on IntegriCloud