Merge commit 'af40847681b978441fdd25276685414f9e17820a' into release/1.1

* commit 'af40847681b978441fdd25276685414f9e17820a':
  h264: check buffer size before accessing it

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-04-21 14:34:02 +02:00

View File

@@ -4042,7 +4042,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
s->workaround_bugs |= FF_BUG_TRUNCATED; s->workaround_bugs |= FF_BUG_TRUNCATED;
if (!(s->workaround_bugs & FF_BUG_TRUNCATED)) if (!(s->workaround_bugs & FF_BUG_TRUNCATED))
while(dst_length > 0 && ptr[dst_length - 1] == 0) while (dst_length > 0 && ptr[dst_length - 1] == 0)
dst_length--; dst_length--;
bit_length = !dst_length ? 0 bit_length = !dst_length ? 0
: (8 * dst_length - : (8 * dst_length -