From 989c7ce9a88aa6e9a3bb2773117c6ad5ee204ef6 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 19 Jan 2014 18:39:56 +0100 Subject: [PATCH] CID#1158211: out-of-bounds access --- sc/source/ui/docshell/datastream.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 04605e4dfe72..a2fa4e474287 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -51,7 +51,7 @@ static double fTimes[DEBUG_TIME_MAX] = { 0.0, 0.0, 0.0 }; double datastream_get_time(int nIdx) { - if( nIdx < 0 || nIdx > (int)SAL_N_ELEMENTS( fTimes ) ) + if( nIdx < 0 || nIdx >= (int)SAL_N_ELEMENTS( fTimes ) ) return -1; return fTimes[ nIdx ]; }