Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/alac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index e06bb14e34..af486abf84 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -250,10 +250,12 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
alac->extra_bits = get_bits(&alac->gb, 2) << 3;
bps = alac->sample_size - alac->extra_bits + channels - 1;
- if (bps > 32U) {
+ if (bps > 32) {
avpriv_report_missing_feature(avctx, "bps %d", bps);
return AVERROR_PATCHWELCOME;
}
+ if (bps < 1)
+ return AVERROR_INVALIDDATA;
/* whether the frame is compressed */
is_compressed = !get_bits1(&alac->gb);