forked from len0rd/rockbox
Fixed a bug that caused codec memory allocation buffer overwrite and
vorbis codec to crash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7362 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b4bdfee43c
commit
fa0cecf5a9
1 changed files with 1 additions and 2 deletions
|
|
@ -210,8 +210,7 @@ static void load_voicefile(void)
|
|||
cpu_boost(true);
|
||||
buf = (unsigned char *)(&p_voicefile->index) +
|
||||
(p_voicefile->id1_max + p_voicefile->id2_max) * sizeof(struct clip_entry);
|
||||
length = file_size - offsetof(struct voicefile, index) -
|
||||
(p_voicefile->id1_max - p_voicefile->id2_max) * sizeof(struct clip_entry);
|
||||
length = file_size - (buf - audiobuf);
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue