mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-21 01:08:25 +00:00
CGE: Add safeguards in text manager
This commit is contained in:
parent
0aa028c3f1
commit
e4ec07a6a1
@ -68,7 +68,7 @@ int16 Text::count() {
|
||||
|
||||
for (line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
|
||||
char *s;
|
||||
|
||||
assert(line.size() <= 513);
|
||||
strcpy(tmpStr, line.c_str());
|
||||
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
|
||||
continue;
|
||||
@ -101,7 +101,7 @@ void Text::load() {
|
||||
for (idx = 0, line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
|
||||
int n = line.size();
|
||||
char *s;
|
||||
|
||||
assert(n <= 513);
|
||||
strcpy(tmpStr, line.c_str());
|
||||
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user