avformat/aiffdec: fix signed integer overflow

Fixes #8151
This commit is contained in:
Paul B Mahol 2019-09-25 17:36:52 +02:00
parent 121bf1b3b8
commit d58752bcb9
1 changed files with 4 additions and 1 deletions

View File

@ -243,7 +243,10 @@ static int aiff_read_header(AVFormatContext *s)
if (size < 0)
return size;
filesize -= size + 8;
if (size >= 0x7fffffff - 8)
filesize = 0;
else
filesize -= size + 8;
switch (tag) {
case MKTAG('C', 'O', 'M', 'M'): /* Common chunk */