PR #23118 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23118
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23118.patch

Fixes: ada-1-poc.mkv

Found-by: Claude and Ada Logics. This issue was found by Anthropic from using 
agents to study security of open source projects, and I am from Ada Logics 
helping validate the found issues and report to maintainers.
Signed-off-by: Michael Niedermayer <[email protected]>


>From 73af1e72bf6559f5b5269b9c541149c0d9c5a7e8 Mon Sep 17 00:00:00 2001
From: David Korczynski <[email protected]>
Date: Sat, 16 May 2026 16:34:30 +0200
Subject: [PATCH] avformat/assenc: Add the missing parentheses

Fixes: ada-1-poc.mkv

Found-by: Claude and Ada Logics. This issue was found by Anthropic from using 
agents to study security of open source projects, and I am from Ada Logics 
helping validate the found issues and report to maintainers.
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/assenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 75c19afd05..b948203885 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -186,7 +186,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
     if (hh2 > 9) hh2 = 9, mm2 = 59, ss2 = 59, ms2 = 99;
 
     text_len = strlen(p);
-    while (text_len > 0 && p[text_len - 1] == '\r' || p[text_len - 1] == '\n')
+    while (text_len > 0 && (p[text_len - 1] == '\r' || p[text_len - 1] == 
'\n'))
         text_len--;
 
     dialogue->line = 
av_asprintf("%s%ld,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%.*s",
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to