mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-26 13:48:55 +08:00
Prevent recursion when parsing outlines
This commit is contained in:
parent
07615469c9
commit
da010a9d44
@ -347,8 +347,8 @@ func (r *PdfReader) buildOutlineTree(obj core.PdfObject, parent *PdfOutlineTreeN
|
||||
}
|
||||
|
||||
// Resolve the reference to next
|
||||
if nextObj := dict.Get("Next"); nextObj != nil {
|
||||
nextObj = core.ResolveReference(nextObj)
|
||||
nextObj := core.ResolveReference(dict.Get("Next"))
|
||||
if nextObj != nil && nextObj != container {
|
||||
if _, isNull := nextObj.(*core.PdfObjectNull); !isNull {
|
||||
next, last, err := r.buildOutlineTree(nextObj, parent, &outlineItem.PdfOutlineTreeNode)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user