Commit a33a1575 authored by James Almer's avatar James Almer

Merge commit 'b98f082d'

* commit 'b98f082d':
  smacker: Check that the data size is a multiple of a sample vector

See 4a9af07aMerged-by: 's avatarJames Almer <jamrial@gmail.com>
parents b5e2974b b98f082d
...@@ -662,7 +662,8 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, ...@@ -662,7 +662,8 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */ /* get output buffer */
frame->nb_samples = unp_size / (avctx->channels * (bits + 1)); frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
if (unp_size % (avctx->channels * (bits + 1))) { if (unp_size % (avctx->channels * (bits + 1))) {
av_log(avctx, AV_LOG_ERROR, "unp_size %d is odd\n", unp_size); av_log(avctx, AV_LOG_ERROR,
"The buffer does not contain an integer number of samples\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) if ((ret = ff_get_buffer(avctx, frame, 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