mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
prevent storing IDs that are higher than we have knowledge about!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2620 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dade571a99
commit
c7e0bea57a
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ int lang_load(char *filename)
|
|||
while(filesize>3) {
|
||||
id = (ptr[0]<<8) | ptr[1]; /* get two-byte id */
|
||||
ptr+=2; /* pass the id */
|
||||
if(id < LANG_LAST_INDEX_IN_ARRAY)
|
||||
language_strings[id] = ptr; /* point to this string */
|
||||
while(*ptr) { /* pass the string */
|
||||
filesize--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue