[poppler] poppler/GfxState.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri May 25 14:27:17 UTC 2018


 poppler/GfxState.cc |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit c1164653bd8d6bcb7da1d959634f63592a393235
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri May 25 16:26:44 2018 +0200

    GfxGouraudTriangleShading::parse: Protect against coordBits <= 0
    
    fixes oss-fuzz/8524

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index f8509ce7..0b9a96bc 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -4781,6 +4781,10 @@ GfxGouraudTriangleShading *GfxGouraudTriangleShading::parse(GfxResources *res, i
     error(errSyntaxWarning, -1, "Missing or invalid BitsPerCoordinate in shading dictionary");
     return nullptr;
   }
+  if (unlikely(coordBits <= 0)) {
+    error(errSyntaxWarning, -1, "Invalid BitsPerCoordinate in shading dictionary");
+    return nullptr;
+  }
   obj1 = dict->lookup("BitsPerComponent");
   if (obj1.isInt()) {
     compBits = obj1.getInt();


More information about the poppler mailing list