From b1c7f076cfb944c320892ac58600fd96c252f53e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 25 Nov 2014 21:12:00 +0000 Subject: assert on loading timestamp in kde80951-1.html Change-Id: I32a9d6cc625537ab6e0940d93bf9a7544df370c8 --- tools/source/inet/inetmsg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx index 3a527124587d..cc3989a10066 100644 --- a/tools/source/inet/inetmsg.cxx +++ b/tools/source/inet/inetmsg.cxx @@ -327,8 +327,8 @@ bool INetRFC822Message::ParseDateField ( rDateTime.SetSec (ParseNumber (aDateField, nIndex)); nIndex++; rDateTime.SetNanoSec (0); - if ((aDateField[nIndex] == '+') || - (aDateField[nIndex] == '-') ) + const char cPossiblePlusMinus = nIndex < aDateField.getLength() ? aDateField[nIndex] : 0; + if (cPossiblePlusMinus == '+' || cPossiblePlusMinus == '-') { // Offset from GMT: "(+|-)HHMM". bool bEast = (aDateField[nIndex++] == '+'); -- cgit