avformat/subfile: Assert that whence is a known case
This may help CID1452449 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 426d8c84c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
82c53d27aa
commit
96d595b129
1 changed files with 2 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
|
|||
case SEEK_END:
|
||||
new_pos = end + pos;
|
||||
break;
|
||||
default:
|
||||
av_assert0(0);
|
||||
}
|
||||
if (new_pos < c->start)
|
||||
return AVERROR(EINVAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue