You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-14 22:15:12 +02:00
dpcm: return error if packet is too small
This commit is contained in:
@ -201,7 +201,10 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
out *= av_get_bytes_per_sample(avctx->sample_fmt);
|
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) {
|
if (*data_size < out) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n");
|
av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
Reference in New Issue
Block a user