Commit a301bb63 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bc11b2c3
......@@ -947,6 +947,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
snprintf(p, end-p, "\n");
p++;
if (end <= p)
return AVERROR(ENOMEM);
}
} else
avctx->stats_out[0] = '\0';
......
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