mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
dfed9fc7bd
commit
49d34302a6
@ -18,6 +18,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/avstring.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "url.h"
|
||||
@ -135,6 +136,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…
Reference in New Issue
Block a user