poppler/GfxState.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit b2545e9368a58a6987614f75d39da4568a076881 Author: Albert Astals Cid <[email protected]> Date: Thu May 4 21:24:23 2017 +0200 Fix regression in GfxIndexedColorSpace::mapColorToBase The bounds check was off by one, making file from bug 100931 render incorrectly. Bug #100931 diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 331d78cf..2c81dfbe 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -16,7 +16,7 @@ // Copyright (C) 2005 Kristian Høgsberg <[email protected]> // Copyright (C) 2006, 2007 Jeff Muizelaar <[email protected]> // Copyright (C) 2006, 2010 Carlos Garcia Campos <[email protected]> -// Copyright (C) 2006-2016 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2017 Albert Astals Cid <[email protected]> // Copyright (C) 2009, 2012 Koji Otani <[email protected]> // Copyright (C) 2009, 2011-2016 Thomas Freitag <[email protected]> // Copyright (C) 2009 Christian Persch <[email protected]> @@ -2663,7 +2663,7 @@ GfxColor *GfxIndexedColorSpace::mapColorToBase(GfxColor *color, n = base->getNComps(); base->getDefaultRanges(low, range, indexHigh); const int idx = (int)(colToDbl(color->c[0]) + 0.5) * n; - if (likely((idx + n < (indexHigh + 1) * base->getNComps()) && idx >= 0)) { + if (likely((idx + n - 1 < (indexHigh + 1) * base->getNComps()) && idx >= 0)) { p = &lookup[idx]; for (i = 0; i < n; ++i) { baseColor->c[i] = dblToCol(low[i] + (p[i] / 255.0) * range[i]);
_______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
