Merge commit 'b98f082d8ddc0a0d8317114d8414ab51de60ef02'

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

See 4a9af07a49

Merged-by: James Almer <jamrial@gmail.com>
pull/272/head
James Almer 7 years ago
commit a33a15751e
  1. 3
      libavcodec/smacker.c

@ -662,7 +662,8 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
frame->nb_samples = 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);
}
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)

Loading…
Cancel
Save