diff options
author | Albert Astals Cid <aacid@kde.org> | 2017-10-13 00:55:49 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2017-10-13 00:55:49 +0200 |
commit | 19ebd40547186a8ea6da08c8d8e2a6d6b7e84f5d (patch) | |
tree | 4d8eeb58b1321cbe48a0f284de73e16bfa84dc09 | |
parent | 7ee9dadef37b20bca707a6b1e858e17d191e368b (diff) |
CairoOutputDev: Fix crash in broken files
Bug #103016
-rw-r--r-- | poppler/CairoOutputDev.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index ffd39ef7..80f7a99e 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -2714,7 +2714,9 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s for (y = 0; y < maskHeight; y++) { maskDest = (unsigned char *) (maskBuffer + y * row_stride); pix = maskImgStr->getLine(); - maskColorMap->getGrayLine (pix, maskDest, maskWidth); + if (likely(pix != nullptr)) { + maskColorMap->getGrayLine (pix, maskDest, maskWidth); + } } maskImgStr->close(); |