This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 86416861a717eab0999512075fcb220e06955887 Author: Niklas Haas <[email protected]> AuthorDate: Tue Aug 11 18:00:43 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Mon Aug 31 10:56:08 2026 +0000 avcodec/j2kenc: add buffer size check before flushing Sponsored-by: nxtedition AB Signed-off-by: Niklas Haas <[email protected]> --- libavcodec/j2kenc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index 295de71169..e517a552d1 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -782,6 +782,9 @@ static int encode_packet(Jpeg2000EncoderContext *s, Jpeg2000ResLevel *rlevel, in } } + if (s->buf_end - s->buf < 3) + return -1; + put_bits(s, !empty, 1); if (empty){ j2k_flush(s); @@ -843,6 +846,10 @@ static int encode_packet(Jpeg2000EncoderContext *s, Jpeg2000ResLevel *rlevel, in } } } + + if (s->buf_end - s->buf < 2 + 2 * s->eph) + return -1; + j2k_flush(s); if (s->eph) { bytestream_put_be16(&s->buf, JPEG2000_EPH); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
