diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-19 01:21:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-19 22:12:55 +0200 |
commit | 4a8506c794d92744514aac26ac9a1b898a7401ab (patch) | |
tree | 6040d4030399c70f9cd88feeea6eff9e727c8277 /libavcodec | |
parent | dd5379db5d83d8b06654582afe327daa6be678a3 (diff) | |
download | ffmpeg-4a8506c794d92744514aac26ac9a1b898a7401ab.tar.gz |
avcodec/vvc/dec: Check init_get_bits8() for failure
Fixes: CID1560042 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vvc/dec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index 25cdb39cab..76b1923340 100644 --- a/libavcodec/vvc/dec.c +++ b/libavcodec/vvc/dec.c @@ -514,6 +514,7 @@ static int slice_init_entry_points(SliceContext *sc, int nb_eps = sh->r->num_entry_points + 1; int ctu_addr = 0; GetBitContext gb; + int ret; if (sc->nb_eps != nb_eps) { eps_free(sc); @@ -523,7 +524,9 @@ static int slice_init_entry_points(SliceContext *sc, sc->nb_eps = nb_eps; } - init_get_bits8(&gb, slice->data, slice->data_size); + ret = init_get_bits8(&gb, slice->data, slice->data_size); + if (ret < 0) + return ret; for (int i = 0; i < sc->nb_eps; i++) { EntryPoint *ep = sc->eps + i; |