projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34e7f70
)
aacsbr: change order of operation to prevent out of array read
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 30 Oct 2014 00:52:04 +0000
(
00:52
+0000)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Mon, 12 Jan 2015 23:06:07 +0000
(
00:06
+0100)
CC: libav-stable@libav.org
Bug-Id: CID 732250
libavcodec/aacsbr.c
patch
|
blob
|
history
diff --git
a/libavcodec/aacsbr.c
b/libavcodec/aacsbr.c
index
4d2ac6c
..
dbfb167
100644
(file)
--- a/
libavcodec/aacsbr.c
+++ b/
libavcodec/aacsbr.c
@@
-549,7
+549,8
@@
static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr)
k = sbr->n_master;
} while (sb != sbr->kx[1] + sbr->m[1]);
- if (sbr->patch_num_subbands[sbr->num_patches-1] < 3 && sbr->num_patches > 1)
+ if (sbr->num_patches > 1 &&
+ sbr->patch_num_subbands[sbr->num_patches - 1] < 3)
sbr->num_patches--;
return 0;