[Libreoffice-commits] core.git: basic/source
Caolán McNamara
caolanm at redhat.com
Tue May 29 08:04:41 UTC 2018
basic/source/comp/scanner.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a2dae039f1209b5324879930c142b24d50fafc69
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 28 21:51:01 2018 +0100
forcepoint#42 check available str length
Change-Id: Ie476968ddaa4c3e5475ae9aa6133e7aba38d5975
Reviewed-on: https://gerrit.libreoffice.org/54976
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f29b5c2a5d9f..e79f145c29b9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -606,7 +606,7 @@ bool SbiScanner::NextSym()
case '>': if( *pLine == '=' ) n = 2; break;
case ':': if( *pLine == '=' ) n = 2; break;
}
- aSym = aLine.copy( nCol, n );
+ aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol));
pLine += n-1; nCol = nCol + n;
}
More information about the Libreoffice-commits
mailing list