summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-29 22:51:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-29 22:56:15 +0200
commit3a3ebc7c7dcc650c917bd36cadff09f1016f964c (patch)
tree61b19d7815fd18b5751be984f182dc6b81c4bae7 /libavformat
parentb24f7cf95070fa71e503069ef288de271258523b (diff)
parent8d07258bb6063d0780ce2d39443d6dc6d8eedc5a (diff)
Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'
* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a': avidec: Make sure a packet is large enough before reading its data Conflicts: libavformat/avidec.c See: 028cc42a1638e6f93a857f11c2568d1c3a51e612 Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avidec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b04a46be33..c7210f026b 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -905,7 +905,8 @@ fail:
static int read_gab2_sub(AVStream *st, AVPacket *pkt)
{
- if (pkt->data && !strcmp(pkt->data, "GAB2") && AV_RL16(pkt->data + 5) == 2) {
+ if (pkt->size >= 7 &&
+ !strcmp(pkt->data, "GAB2") && AV_RL16(pkt->data + 5) == 2) {
uint8_t desc[256];
int score = AVPROBE_SCORE_EXTENSION, ret;
AVIStream *ast = st->priv_data;