diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-26 12:37:13 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-26 12:37:13 +0000 |
commit | e3b3547e20d5f7a634011702ab7a6a5de7d0fea5 (patch) | |
tree | bc8ff2e7ca0d596f6495b5d200545fbfe4c4fa6d /apps/codecs/libfaad | |
parent | a33625bd068a99fd41d4d859cba70d682159502a (diff) | |
download | rockbox-e3b3547e20d5f7a634011702ab7a6a5de7d0fea5.tar.gz rockbox-e3b3547e20d5f7a634011702ab7a6a5de7d0fea5.zip |
Fix an issue in libfaad found by static code analysis. Two arrays within the drc_info structure require a size of 64 due to the related implementation. This code section would not have been called as the decoder checks the number of channels and rejects decoding for files using more than MAX_CHANNELS (2). Closes FS#12245.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30356 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad')
-rw-r--r-- | apps/codecs/libfaad/structs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/codecs/libfaad/structs.h b/apps/codecs/libfaad/structs.h index c241cc41f3..a6114f412a 100644 --- a/apps/codecs/libfaad/structs.h +++ b/apps/codecs/libfaad/structs.h | |||
@@ -45,6 +45,8 @@ extern "C" { | |||
45 | #define MAX_LTP_SFB_S 8 | 45 | #define MAX_LTP_SFB_S 8 |
46 | #define FRAME_LEN 1024 | 46 | #define FRAME_LEN 1024 |
47 | 47 | ||
48 | #define DRC_MAX_CHANNELS 64 /* Should be the same as MAX_CHANNELS, but the DRC code expects 64 */ | ||
49 | |||
48 | /* used to save the prediction state */ | 50 | /* used to save the prediction state */ |
49 | typedef struct { | 51 | typedef struct { |
50 | int16_t r[2]; | 52 | int16_t r[2]; |
@@ -91,8 +93,8 @@ typedef struct | |||
91 | uint8_t prog_ref_level; | 93 | uint8_t prog_ref_level; |
92 | uint8_t dyn_rng_sgn[17]; | 94 | uint8_t dyn_rng_sgn[17]; |
93 | uint8_t dyn_rng_ctl[17]; | 95 | uint8_t dyn_rng_ctl[17]; |
94 | uint8_t exclude_mask[MAX_CHANNELS]; | 96 | uint8_t exclude_mask[DRC_MAX_CHANNELS]; |
95 | uint8_t additional_excluded_chns[MAX_CHANNELS]; | 97 | uint8_t additional_excluded_chns[DRC_MAX_CHANNELS/7]; |
96 | 98 | ||
97 | real_t ctrl1; | 99 | real_t ctrl1; |
98 | real_t ctrl2; | 100 | real_t ctrl2; |