OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f6f407
)
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>
Tue, 4 Nov 2014 14:28:45 +0000
(09:28 -0500)
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
0363aff
..
76c1014
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;