Mercurial > libavformat.hg
changeset 3628:5f2e1da55755 libavformat
matroskadec: use more robust av_strlcpy() instead of strcpy()
author | aurel |
---|---|
date | Tue, 05 Aug 2008 00:39:47 +0000 |
parents | 0dd9806a26ea |
children | 8f06218b8767 |
files | matroskadec.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Mon Aug 04 07:35:07 2008 +0000 +++ b/matroskadec.c Tue Aug 05 00:39:47 2008 +0000 @@ -35,6 +35,7 @@ #include "matroska.h" #include "libavcodec/mpeg4audio.h" #include "libavutil/intfloat_readwrite.h" +#include "libavutil/avstring.h" #include "libavutil/lzo.h" #ifdef CONFIG_ZLIB #include <zlib.h> @@ -2651,7 +2652,7 @@ st->codec->codec_id = codec_id; st->start_time = 0; if (strcmp(track->language, "und")) - strcpy(st->language, track->language); + av_strlcpy(st->language, track->language, 4); if (track->flags & MATROSKA_TRACK_DEFAULT) st->disposition |= AV_DISPOSITION_DEFAULT;