diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-16 16:29:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-16 21:28:49 +0100 |
commit | 18e9fc8bad056fb7c20ed9a2689928f3c8735020 (patch) | |
tree | 6ae1bc7f909f467d3d5be39821ef3cfb37dbf952 /vcl | |
parent | ad7e6339e5e5cf465a2ef25442099eb59f1a0deb (diff) |
ofz#5423 Timeout
Change-Id: I4d102c0370f336ed778e4578db697f520cc740b3
Reviewed-on: https://gerrit.libreoffice.org/48009
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/ixbm/xbmread.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index d44ec06aa5a3..9cbfd4ad4b46 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -212,11 +212,10 @@ bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat if (!aLine.isEmpty()) { - const sal_Int32 nCount = comphelper::string::getTokenCount(aLine, ','); - - for( sal_Int32 i = 0; ( i < nCount ) && ( nRow < nHeight ); ++i ) + sal_Int32 nIndex = 0; + while (nRow < nHeight) { - const OString aToken(aLine.getToken(i, ',')); + const OString aToken(aLine.getToken(0, ',', nIndex)); const sal_Int32 nLen = aToken.getLength(); bool bProcessed = false; @@ -251,6 +250,9 @@ bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat nRow++; } } + + if (nIndex == -1) + break; } } } |