Commit 3b950b72ac for ffmpeg
commit 3b950b72ac93f0d4a1b5a372a688d4bf6bca8799
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Wed Nov 11 15:24:53 2026 +0100
avcodec/jacosubdec: do not skip the terminator after \C and \F
Fixes: out of array read
Fixes: VpgSfZLcX6Uh
Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25134
Out of array read Replicated through API with ASAN
Read beyond the packet Replicated through UnModified FFmpeg with the ass output
diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c
index c9fdfc2627..58a2dd8ca5 100644
--- a/libavcodec/jacosubdec.c
+++ b/libavcodec/jacosubdec.c
@@ -53,12 +53,12 @@ static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
static int insert_color(AVBPrint *dst, const char *in, const char *arg)
{
- return 1; // skip id
+ return !!*in; // skip id
}
static int insert_font(AVBPrint *dst, const char *in, const char *arg)
{
- return 1; // skip id
+ return !!*in; // skip id
}
static const struct {