mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
qdm2: fix out of stack array read.
The read value is not used when its outside the array. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -928,9 +928,9 @@ static int synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int le
|
|||||||
|
|
||||||
if (joined_stereo) {
|
if (joined_stereo) {
|
||||||
float tmp[10][MPA_MAX_CHANNELS];
|
float tmp[10][MPA_MAX_CHANNELS];
|
||||||
|
|
||||||
for (k = 0; k < run; k++) {
|
for (k = 0; k < run; k++) {
|
||||||
tmp[k][0] = samples[k];
|
tmp[k][0] = samples[k];
|
||||||
|
if ((j + k) < 128)
|
||||||
tmp[k][1] = (sign_bits[(j + k) / 8]) ? -samples[k] : samples[k];
|
tmp[k][1] = (sign_bits[(j + k) / 8]) ? -samples[k] : samples[k];
|
||||||
}
|
}
|
||||||
for (chs = 0; chs < q->nb_channels; chs++)
|
for (chs = 0; chs < q->nb_channels; chs++)
|
||||||
|
|||||||
Reference in New Issue
Block a user