diff options
author | Willem Jan Palenstijn | 2011-09-26 10:45:13 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-09-26 10:45:31 +0200 |
commit | 7d8bba26eb8493999520207f69f3ad2706c2811b (patch) | |
tree | 0ceda0fde84496661911a884a48030ff9392f730 | |
parent | c442295b9fc2367905b9e20382e462e3ae9a7804 (diff) | |
download | scummvm-rg350-7d8bba26eb8493999520207f69f3ad2706c2811b.tar.gz scummvm-rg350-7d8bba26eb8493999520207f69f3ad2706c2811b.tar.bz2 scummvm-rg350-7d8bba26eb8493999520207f69f3ad2706c2811b.zip |
AGI: Add FIXME for wordwrap buffer overflow
-rw-r--r-- | engines/agi/text.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 838dc739c9..27488c5f22 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -222,13 +222,14 @@ void AgiEngine::printTextConsole(const char *msg, int x, int y, int len, int fg, * @param str String to wrap. * @param len Length of line. * - * Based on GBAGI implementaiton with permission from the author + * Based on GBAGI implementation with permission from the author */ char *AgiEngine::wordWrapString(const char *s, int *len) { char *outStr, *msgBuf, maxWidth = *len; const char *pWord; int lnLen, wLen; + // FIXME: outStr may end up being longer than s, so this can overflow msgBuf = outStr = strdup(s); int msgWidth = 0; |