mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 19:07:55 +00:00
prevent infinite loop and memcpy of negative amounts
fixes issue194 Originally committed as revision 10726 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
972c5f9e10
commit
4d570f94ba
2 changed files with 6 additions and 0 deletions
|
@ -114,6 +114,9 @@ static int ac3_sync(const uint8_t *buf, int *channels, int *sample_rate,
|
|||
return 0; /* Currently don't support additional streams */
|
||||
|
||||
frmsiz = get_bits(&bits, 11) + 1;
|
||||
if(frmsiz*2 < AC3_HEADER_SIZE)
|
||||
return 0;
|
||||
|
||||
fscod = get_bits(&bits, 2);
|
||||
if (fscod == 3) {
|
||||
fscod2 = get_bits(&bits, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue