aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-08 20:46:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-07 23:36:32 +0200
commit426d8c84c37064eef93bbcfaffd886d00a9a4ee8 (patch)
tree976b37ca4312c94f14a2d51eb863bcbf0211f391
parent2a0a7d964bfd5da8859c715627eeb7a048bddb79 (diff)
downloadffmpeg-426d8c84c37064eef93bbcfaffd886d00a9a4ee8.tar.gz
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>
-rw-r--r--libavformat/subfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/subfile.c b/libavformat/subfile.c
index eedac1524e..be48ef72ef 100644
--- a/libavformat/subfile.c
+++ b/libavformat/subfile.c
@@ -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);