summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/shorten.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index cb3d09dea1..b12d6e652d 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -344,6 +344,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
s->channels = get_uint(s, CHANSIZE);
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
+ s->channels = 0;
return -1;
}