This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 8702f12c9d avcodec/dvdsubenc: account for the byte alignment of each
RLE line
8702f12c9d is described below
commit 8702f12c9daa199cc4d7c17164b13c3cdcdc2436
Author: Michael Niedermayer <[email protected]>
AuthorDate: Mon Sep 14 02:23:52 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Wed Sep 16 21:16:18 2026 +0000
avcodec/dvdsubenc: account for the byte alignment of each RLE line
Fixes: m46RwJIzh7AQ
Fixes: out of array write
Found-by: Zheng Yu @ Depthfirst
---
libavcodec/dvdsubenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c
index 2a5463b8d8..0747c43c31 100644
--- a/libavcodec/dvdsubenc.c
+++ b/libavcodec/dvdsubenc.c
@@ -340,8 +340,8 @@ static int dvdsub_encode(AVCodecContext *avctx,
// encode data block
q = outbuf + 4;
offset1 = q - outbuf;
- // worst case memory requirement: 1 nibble per pixel..
- if ((q - outbuf) + vrect.w * vrect.h / 2 + 17 + 21 > outbuf_size) {
+ // worst case memory requirement: 1 nibble per pixel, lines are byte
aligned
+ if ((q - outbuf) + vrect.h * ((vrect.w + 1) / 2) + 17 + 21 > outbuf_size) {
av_log(NULL, AV_LOG_ERROR, "dvd_subtitle too big\n");
ret = AVERROR_BUFFER_TOO_SMALL;
goto fail;
--
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]