summaryrefslogtreecommitdiff
path: root/libavcodec/dca_xll.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2015-03-16 22:31:41 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-03-17 12:31:07 +0100
commitc9ed48e80ef807ab0c1bb946ac8db5f34d83d9c9 (patch)
tree4e35b57d15ee45d413bf96e48033021a869bbf0f /libavcodec/dca_xll.c
parent48aef27f5232794e70ecef0d347b9f65e27a9bad (diff)
dca: Read params->pancABIT0[param_index] only if part0 is set
Prevent a spurious read from uninitialized memory.
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r--libavcodec/dca_xll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index 0c32d6ecce..5a558b8c48 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -514,8 +514,8 @@ int ff_dca_xll_decode_audio(DCAContext *s, AVFrame *frame)
}
for (i = 0; i < chset->channels; i++) {
int param_index = params->seg_type ? 0 : i;
- int bits = params->pancABIT0[param_index];
int part0 = params->nSamplPart0[param_index];
+ int bits = part0 ? params->pancABIT0[param_index] : 0;
int *sample_buf = s->xll_sample_buf +
(in_channel + i) * s->xll_smpl_in_seg;