From f978e10e82083e60f5545c73fb98815f70251084 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 4 May 2022 10:23:20 +0900 Subject: [PATCH] svg_loader: Fix invaild '<' nested check When Type is DOCTYPE, Child Entities start with '<'. This condition is valid when general Elements (svg, g, path etc) are used. Add a Doctype check to if condition. (There can be various cases related to '<' nested case. But for now, I only add Doctype considering the side effect.) Change-Id: I205a900ac4765d6017f6ddc68c52907e932ce333 --- src/loaders/svg/tvgXmlParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loaders/svg/tvgXmlParser.cpp b/src/loaders/svg/tvgXmlParser.cpp index a12689c..cee97af 100644 --- a/src/loaders/svg/tvgXmlParser.cpp +++ b/src/loaders/svg/tvgXmlParser.cpp @@ -388,7 +388,7 @@ bool simpleXmlParse(const char* buf, unsigned bufLength, bool strip, simpleXMLCb if (p) { //Invalid case: '<' nested - if (*p == '<') return false; + if (*p == '<' && type != SimpleXMLType::Doctype) return false; const char *start, *end; start = itr + 1 + toff; -- 2.7.4