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

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2023-08-11 11:06:52 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2023-08-11 11:06:52 +0300
commit101a71e03bbf860aaafb7090a0e440675cb27660 (patch)
tree33a6b7768fb36f8d468da0490ccfa1a7b0745e7f
parent9fc8fc4cf432640f284113ba502ee027268b0d9f (diff)
Fixes stack overflow for some custom modes
This only affects custom modes (builds with --enable-custom-modes) with frame sizes 2.5, 5, 10, and 20ms and sampling rates below 40 kHz. The problem does not affect normal use of Opus (using OpusEncoder/OpusDecoder) even when built with custom modes enabled, but only special applications that use OpusCustomEncoder/OpusCustomDecoder.
-rw-r--r--celt/bands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/bands.c b/celt/bands.c
index 5320ffab..6785e08e 100644
--- a/celt/bands.c
+++ b/celt/bands.c
@@ -1450,7 +1450,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
if (encode && resynth)
lowband_scratch = _lowband_scratch;
else
- lowband_scratch = X_+M*eBands[m->nbEBands-1];
+ lowband_scratch = X_+M*eBands[m->effEBands-1];
ALLOC(X_save, resynth_alloc, celt_norm);
ALLOC(Y_save, resynth_alloc, celt_norm);
ALLOC(X_save2, resynth_alloc, celt_norm);