From c7e0bea57ad383593ebf8c106a4cccf8bcd46ba1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 14 Oct 2002 12:20:53 +0000 Subject: 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 --- apps/language.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/language.c') 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++; -- cgit v1.2.3