summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-19 21:12:38 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-19 21:12:38 +0000
commit3c2fefdb99b24a000a5d896097cba479ad0e62a7 (patch)
tree7da72cddba360f20da34bcd11204e1efc2851911
parentcb7a3d27e2f036d90a5c359cf850d18ab20c4d5c (diff)
downloadrockbox-3c2fefdb99b24a000a5d896097cba479ad0e62a7.tar.gz
rockbox-3c2fefdb99b24a000a5d896097cba479ad0e62a7.tar.bz2
rockbox-3c2fefdb99b24a000a5d896097cba479ad0e62a7.zip
Bugfix: Due to the wrong position of the LANG_LAST_INDEX_IN_ARRAY marker, lang_load() was potentially unsafe. Loading a newer .lng file with an older rockbox build would have caused an out-of-bound access of language_strings[].
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5607 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/genlang9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/genlang b/tools/genlang
index 6032c84899..e13cd3faf9 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -100,15 +100,18 @@ for(@hfile) {
print HFILE " $_,\n";
}
-print HFILE " /* --- below this follows voice-only strings --- */\n",
- " VOICEONLY_DELIMITER = 0x8000,\n";
+print HFILE <<MOO
+ LANG_LAST_INDEX_IN_ARRAY, /* this is not a string, this is a marker */
+ /* --- below this follows voice-only strings --- */
+ VOICEONLY_DELIMITER = 0x8000,
+MOO
+ ;
for(@vfile) {
print HFILE " $_,\n";
}
print HFILE <<MOO
- LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */
};
/* end of generated enum list */
MOO