[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - basic/source
Caolán McNamara
caolanm at redhat.com
Tue May 29 19:57:28 UTC 2018
basic/source/comp/scanner.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 15ea1cda0b3c37ff944ad9a239b7ed453e8b0591
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/54978
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 67177b7d9f44..89f4140a7a60 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -607,7 +607,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