poppler/Function.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit ca9b9cb264b2d2372a171dd8779ac5527dad2b12 Author: Albert Astals Cid <[email protected]> Date: Fri Jan 10 00:30:37 2020 +0100 Fix crash on broken files TIL INT_MIN / -1 causes FPE Fixes issue #869 diff --git a/poppler/Function.cc b/poppler/Function.cc index cbbaf1aa..8d6fab7a 100644 --- a/poppler/Function.cc +++ b/poppler/Function.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006, 2008-2010, 2013-2015, 2017-2019 Albert Astals Cid <[email protected]> +// Copyright (C) 2006, 2008-2010, 2013-2015, 2017-2020 Albert Astals Cid <[email protected]> // Copyright (C) 2006 Jeff Muizelaar <[email protected]> // Copyright (C) 2010 Christian Feuersänger <[email protected]> // Copyright (C) 2011 Andrea Canciani <[email protected]> @@ -1559,7 +1559,7 @@ void PostScriptFunction::exec(PSStack *stack, int codePtr) const { case psOpIdiv: i2 = stack->popInt(); i1 = stack->popInt(); - if (likely(i2 != 0)) { + if (likely((i2 != 0) && !(i2 == -1 && i1 == INT_MIN))) { stack->pushInt(i1 / i2); } break; _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
