diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-16 11:00:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-16 14:59:59 +0100 |
commit | 3ccb36d0b36f5dc7671ea62dac5e0a1f5eb20439 (patch) | |
tree | a1904ea5d0c0957d32edbbb43b6febef10e8bbd4 | |
parent | 8b992d6f86298e115079a9d93e2569f7bef5b47e (diff) |
ofz#5402 Timeout
Change-Id: Id296f83b92fa8109ccbe8c4360e1d7d0ec199a4d
Reviewed-on: https://gerrit.libreoffice.org/47983
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/filter/ixpm/xpmread.cxx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index bb89e7a5e647..1770a37b0b47 100644 --- a/vcl/source/filter/ixpm/xpmread.cxx +++ b/vcl/source/filter/ixpm/xpmread.cxx @@ -307,21 +307,16 @@ bool XPMReader::ImplGetScanLine( sal_uLong nY ) { for (sal_uLong i = 0; i < mnWidth; ++i) { - for (sal_uLong j = 0; j < mnColors; ++j) + OString aKey(reinterpret_cast<sal_Char*>(pString), mnCpp); + auto it = maColMap.find(aKey); + if (it != maColMap.end()) { - OString aKey(reinterpret_cast<sal_Char*>(pString), mnCpp); - auto it = maColMap.find(aKey); - if (it != maColMap.end()) - { - if (mnColors > 256) - mpAcc->SetPixel(nY, i, Color(it->second[1], it->second[2], it->second[3])); - else - mpAcc->SetPixel(nY, i, BitmapColor(it->second[1])); - if (mpMaskAcc) - mpMaskAcc->SetPixel(nY, i, it->second[0] ? aWhite : aBlack); - - break; - } + if (mnColors > 256) + mpAcc->SetPixel(nY, i, Color(it->second[1], it->second[2], it->second[3])); + else + mpAcc->SetPixel(nY, i, BitmapColor(it->second[1])); + if (mpMaskAcc) + mpMaskAcc->SetPixel(nY, i, it->second[0] ? aWhite : aBlack); } pString += mnCpp; } |