mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 20:50:09 +00:00
nutdec: check that filesize is valid before using it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b12e61ac7f
commit
9d230ba924
@ -562,6 +562,9 @@ static int find_and_decode_index(NUTContext *nut)
|
||||
int8_t *has_keyframe;
|
||||
int ret = -1;
|
||||
|
||||
if(filesize <= 0)
|
||||
return -1;
|
||||
|
||||
avio_seek(bc, filesize - 12, SEEK_SET);
|
||||
avio_seek(bc, filesize - avio_rb64(bc), SEEK_SET);
|
||||
if (avio_rb64(bc) != INDEX_STARTCODE) {
|
||||
|
Loading…
Reference in New Issue
Block a user