Commit 5235db68 authored by Luca Barbato's avatar Luca Barbato Committed by Reinhard Tartler

mpegaudiodec: fix short_start calculation

The value should be always 3, as it follows from the specification.

Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
(cherry picked from commit 97cfa55e)
Signed-off-by: 's avatarReinhard Tartler <siretart@tauware.de>
parent 67317767
......@@ -173,7 +173,7 @@ void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g){
else
g->long_end = 4; /* 8000 Hz */
g->short_start = 2 + (s->sample_rate_index != 8);
g->short_start = 3;
} else {
g->long_end = 0;
g->short_start = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment