summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-13 19:28:01 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-13 20:36:33 +0200
commit9351a156de724edb69ba6e1f05884fe806a13a21 (patch)
treea35b183a331085ed67f733383f63a579426b7235 /libavcodec/ac3dec.h
parenta3508cc3fe643a8adad6a82a60bece3ea3c5dc63 (diff)
downloadffmpeg-9351a156de724edb69ba6e1f05884fe806a13a21.tar.gz
avcodec/ac3dec: Keep track of band structure
It is needed in some corner cases that seem not to be forbidden Fixes: out of array index Fixes: 1538/clusterfuzz-testcase-minimized-4696904925446144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ac3dec.h')
-rw-r--r--libavcodec/ac3dec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index bac661c167..aa4cf04f8a 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -128,6 +128,7 @@ typedef struct AC3DecodeContext {
int phase_flags_in_use; ///< phase flags in use (phsflginu)
int phase_flags[AC3_MAX_CPL_BANDS]; ///< phase flags (phsflg)
int num_cpl_bands; ///< number of coupling bands (ncplbnd)
+ uint8_t cpl_band_struct[AC3_MAX_CPL_BANDS];
uint8_t cpl_band_sizes[AC3_MAX_CPL_BANDS]; ///< number of coeffs in each coupling band
int firstchincpl; ///< first channel in coupling
int first_cpl_coords[AC3_MAX_CHANNELS]; ///< first coupling coordinates states (firstcplcos)
@@ -144,6 +145,7 @@ typedef struct AC3DecodeContext {
int spx_dst_start_freq; ///< spx starting frequency bin for copying (copystartmant)
///< the copy region ends at the start of the spx region.
int num_spx_bands; ///< number of spx bands (nspxbnds)
+ uint8_t spx_band_struct[SPX_MAX_BANDS];
uint8_t spx_band_sizes[SPX_MAX_BANDS]; ///< number of bins in each spx band
uint8_t first_spx_coords[AC3_MAX_CHANNELS]; ///< first spx coordinates states (firstspxcos)
INTFLOAT spx_noise_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS]; ///< spx noise blending factor (nblendfact)