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 65fc0db581 avformat/hlsenc: fix format string vulnerability in
parse_playlist
65fc0db581 is described below
commit 65fc0db581c4ee2a891b7b72f6056357ceb3b0bd
Author: Michael Niedermayer <[email protected]>
AuthorDate: Tue Jan 27 16:57:30 2026 +0100
Commit: michaelni <[email protected]>
CommitDate: Tue Feb 3 11:26:23 2026 +0000
avformat/hlsenc: fix format string vulnerability in parse_playlist
Found-by: Sarthak Munshi <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/hlsenc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 7105404d1e..ee64a5a275 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1242,13 +1242,13 @@ static int parse_playlist(AVFormatContext *s, const
char *url, VariantStream *vs
if (vs->has_subtitle) {
int vtt_index = extract_segment_number(line);
const char *vtt_basename = av_basename(vs->vtt_basename);
- int len = strlen(vtt_basename) + 11;
- char *vtt_file = av_mallocz(len);
- if (!vtt_file) {
+ char *vtt_file = NULL;
+ int ret = replace_int_data_in_filename(&vtt_file,
vtt_basename, 'd', vtt_index);
+ if (ret < 0 || !vtt_file) {
ret = AVERROR(ENOMEM);
goto fail;
}
- snprintf(vtt_file, len, vtt_basename, vtt_index);
+
ff_format_set_url(vs->vtt_avf, vtt_file);
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]