summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/vorbisdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index a86d4c4c36..793f079737 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1182,6 +1182,9 @@ static int vorbis_floor0_decode(vorbis_context *vc,
q *= q;
}
+ if (p + q == 0.0)
+ return AVERROR_INVALIDDATA;
+
/* calculate linear floor value */
q = exp((((amplitude*vf->amplitude_offset) /
(((1ULL << vf->amplitude_bits) - 1) * sqrt(p + q)))