History

avcodec/ass_split: Change order of operations in ass_split_section()

This matches the other branch Fixes out of array read Fixes: 4d142ca76d39fe685effcf5017098723/asan_heap-oob_31ae824_8611_348fdb64f9009b63c8a8eae9a0e497c5.mkv

Michael Niedermayer committed 9 years ago

Commit ae514b11 parent 1398ded1 file · +1 −1Browse files

Unified · Split

libavcodec/ass_split.c+1−1
@@ -275,7 +275,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) · 274 unmodified lines
275275 }
276276 if (section->format_header && !order) {
277277 len = strlen(section->format_header);
278− if (buf[len] == ':' && !strncmp(buf, section->format_header, len)) {
278+ if (!strncmp(buf, section->format_header, len) && buf[len] == ':') {
279279 buf += len + 1;
280280 while (!is_eol(*buf)) {
281281 buf = skip_space(buf);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t