From: JunsuChoi Date: Tue, 22 Jun 2021 07:07:55 +0000 (+0900) Subject: svg_loader SvgLoader: Copy the missing composite url X-Git-Tag: submit/tizen/20210702.111011~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1810defdef68e1613239a774b1c5013cb296aa50;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git svg_loader SvgLoader: Copy the missing composite url When copying an attribute, url information of stype's composite is overwritten with memcpy. This causes double free by deleting the wrong string in freeNodeStyle. --- diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index 1fd6250..883d96b 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -1587,6 +1587,9 @@ static void _copyAttr(SvgNode* to, const SvgNode* from) //Copy style attribute; memcpy(to->style, from->style, sizeof(SvgStyleProperty)); + //Copy style composite attribute (clip-path, mask, ...) + if (from->style->comp.url) to->style->comp.url = new string(from->style->comp.url->c_str()); + //Copy node attribute switch (from->type) { case SvgNodeType::Circle: {