提交 08bd22a6 编写于 作者: J Justin Ruggles

dpcm: return error if packet is too small

上级 0354fb7e
......@@ -201,7 +201,10 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
break;
}
out *= av_get_bytes_per_sample(avctx->sample_fmt);
if (out < 0) {
av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
return AVERROR(EINVAL);
}
if (*data_size < out) {
av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n");
return AVERROR(EINVAL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册