From 1a5e4fd8c5b99478b4e08a69261930bb12aa948b Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Tue, 3 May 2011 11:19:31 -0700 Subject: Replace strncpy() with av_strlcpy(). --- libavformat/mp3enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/mp3enc.c') diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index d46e67b70c..10abe0994c 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -24,6 +24,7 @@ #include "id3v1.h" #include "id3v2.h" #include "rawenc.h" +#include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" #include "libavutil/opt.h" @@ -32,7 +33,7 @@ static int id3v1_set_string(AVFormatContext *s, const char *key, { AVMetadataTag *tag; if ((tag = av_metadata_get(s->metadata, key, NULL, 0))) - strncpy(buf, tag->value, buf_size); + av_strlcpy(buf, tag->value, buf_size); return !!tag; } -- cgit v1.2.3