diff options
author | Eugene Sandulenko | 2016-05-16 10:37:37 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-16 16:56:57 +0200 |
commit | dd1838a3cbffa59f536f81536689fd2d87b672f4 (patch) | |
tree | 5667c4c822458f07aab15af8cb56098d67deb98b /engines/lure | |
parent | 1de6a461ab7fd72b4ab112f99299f13d1edc6416 (diff) | |
download | scummvm-rg350-dd1838a3cbffa59f536f81536689fd2d87b672f4.tar.gz scummvm-rg350-dd1838a3cbffa59f536f81536689fd2d87b672f4.tar.bz2 scummvm-rg350-dd1838a3cbffa59f536f81536689fd2d87b672f4.zip |
LURE: Fix potential buffer overrun introduced in 8577606
Diffstat (limited to 'engines/lure')
-rw-r--r-- | engines/lure/hotspots.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index a972909b8b..29e5d2832e 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -1925,7 +1925,7 @@ void Hotspot::doStatus(HotspotData *hotspot) { if (numGroats > 0) { Common::strlcat(buffer, "\n\n", MAX_DESC_SIZE); Common::strlcat(buffer, stringList.getString(S_YOU_HAVE), MAX_DESC_SIZE); - snprintf(buffer + strlen(buffer), MAX_DESC_SIZE, "%d", numGroats); + snprintf(buffer + strlen(buffer), MAX_DESC_SIZE - strlen(buffer), "%d", numGroats); Common::strlcat(buffer, " ", MAX_DESC_SIZE); Common::strlcat(buffer, stringList.getString((numGroats == 1) ? S_GROAT : S_GROATS), MAX_DESC_SIZE); // Make sure we're not overrunning } |