1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 17:37:23 +00:00

Replace strncat by av_strlcat which is easier to verify for correctness.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30388 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-01-22 21:16:54 +00:00
parent 66998a98da
commit 1e4f16a344

View File

@ -20,6 +20,7 @@
#include "subreader.h"
#include "stream/stream.h"
#include "libavutil/common.h"
#include "libavutil/avstring.h"
#ifdef CONFIG_ENCA
#include <enca.h>
@ -990,8 +991,7 @@ static subtitle *sub_read_line_jacosub(stream_t* st, subtitle * current)
if (!stream_read_line(st, directive, LINE_LEN))
return NULL;
trail_space(directive);
strncat(line2, directive,
(LINE_LEN > 511) ? LINE_LEN : 511);
av_strlcat(line2, directive, LINE_LEN);
break;
}
default: