summaryrefslogtreecommitdiff
path: root/apps/language.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-14 12:20:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-14 12:20:53 +0000
commitc7e0bea57ad383593ebf8c106a4cccf8bcd46ba1 (patch)
tree32b0ead68aa4d8402ca187e7949ed9c814a18e1d /apps/language.c
parentdade571a99b46ad5ae70ba6b36e0653ddce6c47b (diff)
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
Diffstat (limited to 'apps/language.c')
-rw-r--r--apps/language.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/language.c b/apps/language.c
index df8c32a05e..6ac8550e55 100644
--- a/apps/language.c
+++ b/apps/language.c
@@ -43,7 +43,8 @@ int lang_load(char *filename)
while(filesize>3) {
id = (ptr[0]<<8) | ptr[1]; /* get two-byte id */
ptr+=2; /* pass the id */
- language_strings[id] = ptr; /* point to this string */
+ if(id < LANG_LAST_INDEX_IN_ARRAY)
+ language_strings[id] = ptr; /* point to this string */
while(*ptr) { /* pass the string */
filesize--;
ptr++;