Commit 580a6832 authored by aurel's avatar aurel

matroskadec: use more robust av_strlcpy() instead of strcpy()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14548 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ce6f3fd6
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "matroska.h" #include "matroska.h"
#include "libavcodec/mpeg4audio.h" #include "libavcodec/mpeg4audio.h"
#include "libavutil/intfloat_readwrite.h" #include "libavutil/intfloat_readwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/lzo.h" #include "libavutil/lzo.h"
#ifdef CONFIG_ZLIB #ifdef CONFIG_ZLIB
#include <zlib.h> #include <zlib.h>
...@@ -2651,7 +2652,7 @@ matroska_read_header (AVFormatContext *s, ...@@ -2651,7 +2652,7 @@ matroska_read_header (AVFormatContext *s,
st->codec->codec_id = codec_id; st->codec->codec_id = codec_id;
st->start_time = 0; st->start_time = 0;
if (strcmp(track->language, "und")) if (strcmp(track->language, "und"))
strcpy(st->language, track->language); av_strlcpy(st->language, track->language, 4);
if (track->flags & MATROSKA_TRACK_DEFAULT) if (track->flags & MATROSKA_TRACK_DEFAULT)
st->disposition |= AV_DISPOSITION_DEFAULT; st->disposition |= AV_DISPOSITION_DEFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment