Commit 9d230ba9 authored by Michael Niedermayer's avatar Michael Niedermayer

nutdec: check that filesize is valid before using it.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b12e61ac
......@@ -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) {
......
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