aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2010-11-27 01:07:06 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-11-27 01:07:06 +0000
commit4ab4d65f352fbc91e366a21c780ad7e653f02cd6 (patch)
tree45dfa4960e67f7e83d5ef8d12a1b7fc6035c1e6e
parent9d09ebf1ed489b26d2bb09549016e114ef8d54b2 (diff)
downloadffmpeg-4ab4d65f352fbc91e366a21c780ad7e653f02cd6.tar.gz
ensure the ASS string in AVSubtitleRect is 0 terminated
Originally committed as revision 25832 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 12aa8c7d15..cd5e652c56 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -63,6 +63,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
rects[sub->num_rects]->ass = av_malloc(len + dlen + 1);
strcpy (rects[sub->num_rects]->ass , header);
strncpy(rects[sub->num_rects]->ass + len, dialog, dlen);
+ rects[sub->num_rects]->ass[len+dlen] = 0;
sub->num_rects++;
return dlen;
}