Commit 3a3ebc7c authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '8d07258b'

* commit '8d07258b':
  avidec: Make sure a packet is large enough before reading its data

Conflicts:
	libavformat/avidec.c

See: 028cc42a
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents b24f7cf9 8d07258b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment