poppler/GfxState.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit aad32f4999eb3fb6aa5b8d0485af9fabc98bb01a Author: Albert Astals Cid <aa...@kde.org> Date: Wed Apr 21 23:54:27 2021 +0200 GfxShading::init: Fix assert in broken files Fixes issue #1071 diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 05ce3a8e..4b0d6796 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -3526,7 +3526,10 @@ bool GfxShading::init(GfxResources *res, Dict *dict, OutputDev *out, GfxState *s hasBackground = true; for (i = 0; i < colorSpace->getNComps(); ++i) { Object obj2 = obj1.arrayGet(i); - background.c[i] = dblToCol(obj2.getNum()); + background.c[i] = dblToCol(obj2.getNum(&hasBackground)); + } + if (!hasBackground) { + error(errSyntaxWarning, -1, "Bad Background in shading dictionary"); } } else { error(errSyntaxWarning, -1, "Bad Background in shading dictionary"); _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler