[gs-commits] mupdf 1.16.1.86 Bug 701652: Fix infinite recursion in pro

[email protected] (Robin Watts) Sun, 6 Oct 2019 15:56:33 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
commit 2c8448860363990948f18f8f869a99ba9ef4e105
Author: Robin Watts <[email protected]>
Date:   Sat Oct 5 13:25:38 2019 +0100

    Bug 701652: Fix infinite recursion in processing HTML.
    
    The final few "next" pointers in the xml structure could be
    left uninitialised if the open/closes don't match perfectly.
    Now fixed.

diff --git a/source/fitz/xml.c b/source/fitz/xml.c
index ac38a9c..58f8209 100644
--- a/source/fitz/xml.c
+++ b/source/fitz/xml.c
@@ -755,6 +755,9 @@ fz_parse_xml(fz_context *ctx, fz_buffer *buf, int preserve_white)
 		if (error)
 			fz_throw(ctx, FZ_ERROR_GENERIC, "%s", error);
 
+		for (node = parser.head; node; node = node->up)
+			node->next = NULL;
+
 		for (node = root.down; node; node = node->next)
 			node->up = NULL;
 

http://git.ghostscript.com/?p=mupdf.git;a=commit;h=2c8448860363990948f18f8f869a99ba9ef4e105

--
MuPDF library
Artifex Software, Inc.