diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-01-19 21:12:38 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-01-19 21:12:38 +0000 |
commit | 3c2fefdb99b24a000a5d896097cba479ad0e62a7 (patch) | |
tree | 7da72cddba360f20da34bcd11204e1efc2851911 | |
parent | cb7a3d27e2f036d90a5c359cf850d18ab20c4d5c (diff) | |
download | rockbox-3c2fefdb99b24a000a5d896097cba479ad0e62a7.tar.gz 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-x | tools/genlang | 9 |
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) { | |||
100 | print HFILE " $_,\n"; | 100 | print HFILE " $_,\n"; |
101 | } | 101 | } |
102 | 102 | ||
103 | print HFILE " /* --- below this follows voice-only strings --- */\n", | 103 | print HFILE <<MOO |
104 | " VOICEONLY_DELIMITER = 0x8000,\n"; | 104 | LANG_LAST_INDEX_IN_ARRAY, /* this is not a string, this is a marker */ |
105 | /* --- below this follows voice-only strings --- */ | ||
106 | VOICEONLY_DELIMITER = 0x8000, | ||
107 | MOO | ||
108 | ; | ||
105 | 109 | ||
106 | for(@vfile) { | 110 | for(@vfile) { |
107 | print HFILE " $_,\n"; | 111 | print HFILE " $_,\n"; |
108 | } | 112 | } |
109 | 113 | ||
110 | print HFILE <<MOO | 114 | print HFILE <<MOO |
111 | LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */ | ||
112 | }; | 115 | }; |
113 | /* end of generated enum list */ | 116 | /* end of generated enum list */ |
114 | MOO | 117 | MOO |