aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-16 10:37:37 +0200
committerEugene Sandulenko2016-05-16 16:56:57 +0200
commitdd1838a3cbffa59f536f81536689fd2d87b672f4 (patch)
tree5667c4c822458f07aab15af8cb56098d67deb98b /engines/lure
parent1de6a461ab7fd72b4ab112f99299f13d1edc6416 (diff)
downloadscummvm-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.cpp2
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
}