forked from len0rd/rockbox
mp3_enc.c: fix MP3 recording at 32 kHz sample rate
Fixes a buffer overflow present when MP3 is encoded at 32000 Hz sample rate, affected bitrates are 320 and 256 kbps. Change-Id: I7634e70409be9d675d47be316a42630dd3147636
This commit is contained in:
parent
ab3581c7ef
commit
d68ecccd88
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int bitpos; /* current bitpos for writing */
|
int bitpos; /* current bitpos for writing */
|
||||||
uint32_t bbuf[263];
|
uint32_t bbuf[362];
|
||||||
} bf_data;
|
} bf_data;
|
||||||
|
|
||||||
struct huffcodetab
|
struct huffcodetab
|
||||||
|
@ -129,7 +129,7 @@ static int mdct_freq [576] IBSS_ATTR; /* 2304 Bytes */
|
||||||
static char mdct_sign [576] IBSS_ATTR; /* 576 Bytes */
|
static char mdct_sign [576] IBSS_ATTR; /* 576 Bytes */
|
||||||
static short enc_data [576] IBSS_ATTR; /* 1152 Bytes */
|
static short enc_data [576] IBSS_ATTR; /* 1152 Bytes */
|
||||||
static uint32_t scalefac [22] IBSS_ATTR; /* 88 Bytes */
|
static uint32_t scalefac [22] IBSS_ATTR; /* 88 Bytes */
|
||||||
static bf_data coded_data IBSS_ATTR; /* 1056 Bytes */
|
static bf_data coded_data IBSS_ATTR; /* 1448 Bytes */
|
||||||
static uint8_t band_scale_f[22] IBSS_ATTR; /* 22 Bytes */
|
static uint8_t band_scale_f[22] IBSS_ATTR; /* 22 Bytes */
|
||||||
|
|
||||||
#ifdef MP3_ENC_COP
|
#ifdef MP3_ENC_COP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue