From 75e61b0e88ddb17fa57f8e3bc10d27cb1282a815 Mon Sep 17 00:00:00 2001 From: Måns Rullgård Date: Sat, 23 Jun 2007 23:10:32 +0000 Subject: use new string functions based on patch by Reimar Döffinger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 9401 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/img2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavformat/img2.c') diff --git a/libavformat/img2.c b/libavformat/img2.c index 7292bff719..8d36593ac2 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "avstring.h" typedef struct { int img_first; @@ -182,7 +183,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) return AVERROR(ENOMEM); } - pstrcpy(s->path, sizeof(s->path), s1->filename); + av_strlcpy(s->path, s1->filename, sizeof(s->path)); s->img_number = 0; s->img_count = 0; @@ -307,7 +308,7 @@ static int img_write_header(AVFormatContext *s) VideoData *img = s->priv_data; img->img_number = 1; - pstrcpy(img->path, sizeof(img->path), s->filename); + av_strlcpy(img->path, s->filename, sizeof(img->path)); /* find format */ if (s->oformat->flags & AVFMT_NOFILE) -- cgit v1.2.3