1
0
Fork 0
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:
Miika Pekkarinen 2005-08-20 18:49:14 +00:00
parent b4bdfee43c
commit fa0cecf5a9

View file

@ -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++)
{