[poppler] poppler/GfxState.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed May 23 17:30:19 UTC 2018


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

New commits:
commit 62c7a6a135aa8c70f638bac9b41a11c4e69c8452
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed May 23 19:29:39 2018 +0200

    GfxImageColorMap::GfxImageColorMap: Bail out early if bits <= 0
    
    fixes oss-fuzz/8478

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index b76c52d9..f8509ce7 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -5697,6 +5697,9 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
   }
   byte_lookup = nullptr;
 
+  if (unlikely(bits <= 0))
+    goto err1;
+
   // get decode map
   if (decode->isNull()) {
     nComps = colorSpace->getNComps();


More information about the poppler mailing list