basic/source/comp/scanner.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 15ea1cda0b3c37ff944ad9a239b7ed453e8b0591 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits