avcodec/aacsbr_template: Do not change bs_num_env before its checked
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 12 May 2017 02:12:15 +0000 (04:12 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 20 May 2017 01:41:33 +0000 (03:41 +0200)
commit699ca0075a24c6861517e9240d8baa4b116cfe68
treecb88a7873144cfe9cb4c0614d1414bf4cd21f047
parentcb45926aa934fa797e3e63922e1927ac8a8670d6
avcodec/aacsbr_template: Do not change bs_num_env before its checked

Fixes: 1489/clusterfuzz-testcase-minimized-5075102901207040
Fixes: out of array access

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 87b08ee6d2a3b0880f0a267c5d51dc7f415e81d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/aacsbr_template.c