diff options
author | Måns Rullgård <mans@mansr.com> | 2007-06-24 12:11:45 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-06-24 12:11:45 +0000 |
commit | d367783979325c9460163b16fed84e0db2f4a5eb (patch) | |
tree | c33cb2e56316999357bc7030638b8d58f0b563fe /libavformat | |
parent | f7d78f3654f8181fb889000dfc2b9a91ca85e418 (diff) | |
download | ffmpeg-d367783979325c9460163b16fed84e0db2f4a5eb.tar.gz |
replace strncpy with av_strlcpy
Originally committed as revision 9407 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparsevorbis.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 5de221cb4d..a03581a05c 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -27,6 +27,7 @@ #include "bitstream.h" #include "bswap.h" #include "ogg2.h" +#include "avstring.h" extern int vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) @@ -88,15 +89,15 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) // took from Vorbis_I_spec if (!strcmp (tt, "AUTHOR")) - strncpy (as->author, ct, FFMIN(sizeof (as->author), vl)); + av_strlcpy (as->author, ct, sizeof (as->author)); else if (!strcmp (tt, "TITLE")) - strncpy (as->title, ct, FFMIN(sizeof (as->title), vl)); + av_strlcpy (as->title, ct, sizeof (as->title)); else if (!strcmp (tt, "COPYRIGHT")) - strncpy (as->copyright, ct, FFMIN(sizeof (as->copyright), vl)); + av_strlcpy (as->copyright, ct, sizeof (as->copyright)); else if (!strcmp (tt, "DESCRIPTION")) - strncpy (as->comment, ct, FFMIN(sizeof (as->comment), vl)); + av_strlcpy (as->comment, ct, sizeof (as->comment)); else if (!strcmp (tt, "GENRE")) - strncpy (as->genre, ct, FFMIN(sizeof (as->genre), vl)); + av_strlcpy (as->genre, ct, sizeof (as->genre)); else if (!strcmp (tt, "TRACKNUMBER")) as->track = atoi (ct); //Too bored to add others for today |