diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2025-08-21 18:40:26 +0200 |
---|---|---|
committer | michaelni <michael@niedermayer.cc> | 2025-08-21 21:02:40 +0000 |
commit | d4e28917afb82548fe830448033068c080cafd02 (patch) | |
tree | 31c3d0d5badd50df880be37d68c5a2d4e082fafc | |
parent | 7caa2a65d9d73848e0d4167fed86aac6780f4bbe (diff) | |
download | ffmpeg-d4e28917afb82548fe830448033068c080cafd02.tar.gz |
avcodec/sanm: Replace impossible bitstream check by assert
the space left and size have already been cross checked by the caller
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/sanm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index 4cf1ac5221..28fdcb3659 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -1832,8 +1832,7 @@ static int process_ftch(SANMVideoContext *ctx, int size) xoff = bytestream2_get_le16u(&ctx->gb); yoff = bytestream2_get_le16u(&ctx->gb); } else { - if (bytestream2_get_bytes_left(&ctx->gb) < 12) - return AVERROR_INVALIDDATA; + av_assert0(bytestream2_get_bytes_left(&ctx->gb) >= 12); bytestream2_skip(&ctx->gb, 4); xoff = bytestream2_get_be32u(&ctx->gb); yoff = bytestream2_get_be32u(&ctx->gb); |