diff options
author | Strangerke | 2013-04-18 08:10:07 +0200 |
---|---|---|
committer | Strangerke | 2013-04-18 08:10:07 +0200 |
commit | e4ec07a6a1e6ad9f5f72912332ec47742b832f7f (patch) | |
tree | 89bf022f009eb8b3269c64a130358c092faaaa74 | |
parent | 0aa028c3f14ae97f2bea6e2ca21ad987833e9eac (diff) | |
download | scummvm-rg350-e4ec07a6a1e6ad9f5f72912332ec47742b832f7f.tar.gz scummvm-rg350-e4ec07a6a1e6ad9f5f72912332ec47742b832f7f.tar.bz2 scummvm-rg350-e4ec07a6a1e6ad9f5f72912332ec47742b832f7f.zip |
CGE: Add safeguards in text manager
-rw-r--r-- | engines/cge/text.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index a8ce8777c5..27bb0608fd 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -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; |