mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
ensure the ASS string in AVSubtitleRect is 0 terminated
Originally committed as revision 25832 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9d09ebf1ed
commit
4ab4d65f35
@ -63,6 +63,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
|
|||||||
rects[sub->num_rects]->ass = av_malloc(len + dlen + 1);
|
rects[sub->num_rects]->ass = av_malloc(len + dlen + 1);
|
||||||
strcpy (rects[sub->num_rects]->ass , header);
|
strcpy (rects[sub->num_rects]->ass , header);
|
||||||
strncpy(rects[sub->num_rects]->ass + len, dialog, dlen);
|
strncpy(rects[sub->num_rects]->ass + len, dialog, dlen);
|
||||||
|
rects[sub->num_rects]->ass[len+dlen] = 0;
|
||||||
sub->num_rects++;
|
sub->num_rects++;
|
||||||
return dlen;
|
return dlen;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user