basic/source/comp/scanner.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit f2d5ba04a7660ecea326d90d08ec8002462883a5 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/54977 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits