aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-14 18:10:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-14 18:10:35 +0100
commit6ca2465556836d20ab9ea5689960fbf1fbda0e23 (patch)
tree2d22acc45b1246cc25b6a94482375efa173114fa /libavcodec
parentb2c2589ecf87e6d42d4134e726552a35b2820e09 (diff)
downloadffmpeg-6ca2465556836d20ab9ea5689960fbf1fbda0e23.tar.gz
ass_split_section: dont overread array
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ass_split.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index 7ee48b4a5c..4ef3092cf8 100644
--- a/libavcodec/ass_split.c
+++ b/libavcodec/ass_split.c
@@ -267,7 +267,8 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
}
}
}
- buf += strcspn(buf, "\n") + 1;
+ buf += strcspn(buf, "\n");
+ buf += !!*buf;
}
return buf;
}