diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-01 21:17:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-03 02:35:50 +0200 |
commit | f9218e4d52e16494ed816651a110dfe0ad22638c (patch) | |
tree | 84085a66a7a35d0c931bf2633f7173ab6c75ef76 | |
parent | a7c4f119c91bcb3791a3c242ee61a5c60379db4f (diff) | |
download | ffmpeg-f9218e4d52e16494ed816651a110dfe0ad22638c.tar.gz |
avcodec/avs3_parser: assert the return value of init_get_bits()
Fixes: CID1492867 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/avs3_parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index a819b5783d..ea495b1c7c 100644 --- a/libavcodec/avs3_parser.c +++ b/libavcodec/avs3_parser.c @@ -73,7 +73,8 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf, GetBitContext gb; int profile, ratecode, low_delay; - init_get_bits8(&gb, buf + 4, buf_size - 4); + av_unused int ret = init_get_bits(&gb, buf + 4, 100); + av_assert1(ret >= 0); s->key_frame = 1; s->pict_type = AV_PICTURE_TYPE_I; |