[poppler] poppler/Function.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue May 22 18:02:18 UTC 2018


 poppler/Function.cc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 91079d4f482b35f190a4f2bbd9f4fb6a8ad7c2a2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue May 22 20:01:56 2018 +0200

    SampledFunction: Fix potential divide by zero
    
    fixes oss-fuzz/8455

diff --git a/poppler/Function.cc b/poppler/Function.cc
index 5437de35..39c09671 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 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2008-2010, 2013-2015, 2017, 2018 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
 // Copyright (C) 2011 Andrea Canciani <ranma42 at gmail.com>
@@ -321,6 +321,10 @@ SampledFunction::SampledFunction(Object *funcObj, Dict *dict) {
     }
   }
   for (i = 0; i < m; ++i) {
+    if (unlikely((domain[i][1] - domain[i][0]) == 0)) {
+      error(errSyntaxError, -1, "Illegal value in function domain array");
+      return;
+    }
     inputMul[i] = (encode[i][1] - encode[i][0]) /
                   (domain[i][1] - domain[i][0]);
   }


More information about the poppler mailing list