This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/5.1 in repository ffmpeg.
commit ebdd42dc99d06dac6fd4262136dadb5681d3d29b Author: Eli Kobrin <[email protected]> AuthorDate: Wed Aug 2 15:14:10 2023 +0300 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Jun 21 02:56:27 2026 +0200 libswresample: Prevent out of bounds. We've been fuzzing torchvision with [sydr-fuzz](https://github.com/ispras/oss-sydr-fuzz) and found out of bounds error in ffmpeg project at audioconvert.c:151. To prevent error we need to fix checks for in and out fmt in swr_init. Signed-off-by: Eli Kobrin <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 3e97d96e6f239894317fc6eb778b25ce67ce5451) Signed-off-by: Michael Niedermayer <[email protected]> --- libswresample/swresample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 51b2ffd0c3..eea4a36813 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -212,11 +212,11 @@ av_cold int swr_init(struct SwrContext *s){ clear_context(s); - if(s-> in_sample_fmt >= AV_SAMPLE_FMT_NB){ + if((unsigned) s-> in_sample_fmt >= AV_SAMPLE_FMT_NB){ av_log(s, AV_LOG_ERROR, "Requested input sample format %d is invalid\n", s->in_sample_fmt); return AVERROR(EINVAL); } - if(s->out_sample_fmt >= AV_SAMPLE_FMT_NB){ + if((unsigned) s->out_sample_fmt >= AV_SAMPLE_FMT_NB){ av_log(s, AV_LOG_ERROR, "Requested output sample format %d is invalid\n", s->out_sample_fmt); return AVERROR(EINVAL); } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
