From 8045edab27488ba3cc849be613afe893cb4317e5 Mon Sep 17 00:00:00 2001 From: Thomas Fach-Pedersen Date: Mon, 24 Oct 2016 19:28:47 +0200 Subject: BLADERUNNER: Fix out-of-bounds write (CID 1364262) --- engines/bladerunner/movement_track.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/bladerunner') diff --git a/engines/bladerunner/movement_track.cpp b/engines/bladerunner/movement_track.cpp index 60a190a9a2..bd74116566 100644 --- a/engines/bladerunner/movement_track.cpp +++ b/engines/bladerunner/movement_track.cpp @@ -50,7 +50,7 @@ int MovementTrack::append(int waypointId, int delay, int running) { } int MovementTrack::append(int waypointId, int delay, int angle, int running) { - if (_lastIndex > ARRAYSIZE(_entries)) + if (_lastIndex >= ARRAYSIZE(_entries)) return 0; _entries[_lastIndex].waypointId = waypointId; -- cgit v1.2.3