From 6809f254ebe3975f11299abb58fd22e4f79471d5 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Tue, 19 Mar 2013 08:36:12 -0500 Subject: [PATCH] Protection from empty/invalid root or kid in NameTree --- src/obj.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/obj.js b/src/obj.js index d1a0f363f..993e9a2fa 100644 --- a/src/obj.js +++ b/src/obj.js @@ -797,6 +797,9 @@ var NameTree = (function NameTreeClosure() { while (queue.length > 0) { var i, n; var obj = xref.fetchIfRef(queue.shift()); + if (!isDict(obj)) { + continue; + } if (obj.has('Kids')) { var kids = obj.get('Kids'); for (i = 0, n = kids.length; i < n; i++) {