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 <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
200cbaeb5a
commit
08d7646abf
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user