[gs-commits] mupdf 1.16.1.91 Fix XML from ever storing a completely em
[email protected] (Robin Watts) Tue, 15 Oct 2019 12:17:10 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit ade77db9494b409a1a577e3fd6d4375b0a70b982 Author: Robin Watts <[email protected]> Date: Sat Oct 5 07:56:12 2019 -0500 Fix XML from ever storing a completely empty text node. Due to a duff comparison we could store some extra nodes. diff --git a/source/fitz/xml.c b/source/fitz/xml.c index c5d56dc..e2d6419 100644 --- a/source/fitz/xml.c +++ b/source/fitz/xml.c @@ -515,7 +515,7 @@ parse_text: while (*p && *p != '<') ++p; if (*p == '<') { /* skip trailing newline before closing tag */ - if (p[1] == '/' && p - 1 >= mark && p[-1] == '\n') + if (p[1] == '/' && mark < p - 1 && p[-1] == '\n') xml_emit_text(ctx, parser, mark, p - 1); else if (mark < p) xml_emit_text(ctx, parser, mark, p); http://git.ghostscript.com/?p=mupdf.git;a=commit;h=ade77db9494b409a1a577e3fd6d4375b0a70b982 -- MuPDF library Artifex Software, Inc.