OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
134b8cb
)
aacsbr: Check that bs_num_env is valid before writing arrays with it as an offset.
author
Alex Converse
<alex.converse@gmail.com>
Tue, 9 Mar 2010 21:50:10 +0000
(21:50 +0000)
committer
Alex Converse
<alex.converse@gmail.com>
Tue, 9 Mar 2010 21:50:10 +0000
(21:50 +0000)
Originally committed as revision 22413 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/aacsbr.c
patch
|
blob
|
history
diff --git
a/libavcodec/aacsbr.c
b/libavcodec/aacsbr.c
index
59517b1
..
6915152
100644
(file)
--- a/
libavcodec/aacsbr.c
+++ b/
libavcodec/aacsbr.c
@@
-689,7
+689,6
@@
static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
num_rel_lead = get_bits(gb, 2);
num_rel_trail = get_bits(gb, 2);
ch_data->bs_num_env = num_rel_lead + num_rel_trail + 1;
- ch_data->t_env[ch_data->bs_num_env] = abs_bord_trail;
if (ch_data->bs_num_env > 5) {
av_log(ac->avccontext, AV_LOG_ERROR,
@@
-698,6
+697,8
@@
static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
return -1;
}
+ ch_data->t_env[ch_data->bs_num_env] = abs_bord_trail;
+
for (i = 0; i < num_rel_lead; i++)
ch_data->t_env[i + 1] = ch_data->t_env[i] + 2 * get_bits(gb, 2) + 2;
for (i = 0; i < num_rel_trail; i++)