# HG changeset patch # User aurel # Date 1217896787 0 # Node ID 5f2e1da557557bd8711d7f7d5cf6587c632ff652 # Parent 0dd9806a26ea107366b108d364ae8865c993f21e matroskadec: use more robust av_strlcpy() instead of strcpy() diff -r 0dd9806a26ea -r 5f2e1da55755 matroskadec.c --- 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 @@ -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;