From: JunsuChoi Date: Fri, 4 Sep 2020 04:53:36 +0000 (+0900) Subject: SvgLoaderCommon: Add initialization in SvgVector X-Git-Tag: accepted/tizen/unified/20200907.045053~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91d5fd26917f0c132a55e54c42df4333f1498fba;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git SvgLoaderCommon: Add initialization in SvgVector A segfault occurs when calling clear() a list without push. This patch prevents it. Change-Id: Ifb238def28990c2ac9621affadf23803a5e01fb2 --- diff --git a/src/loaders/svg/tvgSvgLoaderCommon.h b/src/loaders/svg/tvgSvgLoaderCommon.h index f579c59..eddc5a5 100644 --- a/src/loaders/svg/tvgSvgLoaderCommon.h +++ b/src/loaders/svg/tvgSvgLoaderCommon.h @@ -122,9 +122,9 @@ struct SvgStyleGradient; template struct SvgVector { - T* list; - uint32_t cnt; - uint32_t reserved; + T* list = nullptr; + uint32_t cnt = 0; + uint32_t reserved = 0; void push(T element) {