From: JunsuChoi Date: Wed, 4 May 2022 01:23:20 +0000 (+0900) Subject: svg_loader: Fix invaild '<' nested check X-Git-Tag: accepted/tizen/unified/20230309.161424~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F289339%2F1;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git 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 --- diff --git a/src/loaders/svg/tvgXmlParser.cpp b/src/loaders/svg/tvgXmlParser.cpp index a12689c7..cee97af8 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;