poppler/OptionalContent.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 94527d5a61eb3402b49436b978bad69f71884051 Author: Adam Reichold <[email protected]> Date: Sat Sep 15 09:31:37 2018 +0200 Check for Ref type before unwrapping Object as such oss-fuzz/10359 diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc index 8376a0e4..3f0ef264 100644 --- a/poppler/OptionalContent.cc +++ b/poppler/OptionalContent.cc @@ -7,6 +7,7 @@ // Copyright 2008, 2010 Carlos Garcia Campos <[email protected]> // Copyright 2008, 2010, 2011, 2017, 2018 Albert Astals Cid <[email protected]> // Copyright 2008 Mark Kaplan <[email protected]> +// Copyright 2018 Adam Reichold <[email protected]> // // Released under the GPL (version 2, or later, at your option) // @@ -22,7 +23,6 @@ #include "goo/GooString.h" #include "goo/GooList.h" #include "Error.h" -// #include "PDFDocEncoding.h" #include "OptionalContent.h" // Max depth of nested visibility expressions. This is used to catch @@ -184,7 +184,6 @@ bool OCGs::optContentIsVisible( Object *dictRef ) return result; } dict = dictObj.getDict(); - // printf("checking if optContent is visible\n"); Object dictType = dict->lookup("Type"); if (dictType.isName("OCMD")) { Object ve = dict->lookup("VE"); @@ -213,13 +212,12 @@ bool OCGs::optContentIsVisible( Object *dictRef ) } } } - } else if ( dictType.isName("OCG") ) { + } else if ( dictType.isName("OCG") && dictRef->isRef() ) { OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() ); if ( oc && oc->getState() == OptionalContentGroup::Off ) { result=false; } } - // printf("visibility: %s\n", result? "on" : "off"); return result; } _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
