aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index b6b49dc049..533e834a54 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -292,6 +292,11 @@ static int pcm_decode_frame(AVCodecContext *avctx,
/* we process 40-bit blocks per channel for LXF */
sample_size = 5;
+ if (sample_size == 0) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
+ return AVERROR(EINVAL);
+ }
+
n = avctx->channels * sample_size;
if(n && buf_size % n){