Commit db27f50e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Fix mixed declaration and statement warning

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8327bef1
......@@ -214,10 +214,11 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
static int mov_metadata_raw(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
char *value;
// Check for overflow.
if (len >= INT_MAX)
return AVERROR(EINVAL);
char *value = av_malloc(len + 1);
value = av_malloc(len + 1);
if (!value)
return AVERROR(ENOMEM);
avio_read(pb, value, len);
......
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