tvg_saver: fix the invalid data size. accepted/tizen/unified/20210727.124506 submit/tizen/20210726.072959
authorHermet Park <chuneon.park@samsung.com>
Mon, 26 Jul 2021 07:12:23 +0000 (16:12 +0900)
committerHermet Park <chuneon.park@samsung.com>
Mon, 26 Jul 2021 07:20:20 +0000 (16:20 +0900)
sizeof(colors) indicates its pointer size, we actually intended to the structure size.

Change-Id: I007dbc615a9f241e009a513b401de32232aee64a

src/examples/images/test.tvg
src/savers/tvg/tvgTvgSaver.cpp

index df8e13c..997d9aa 100644 (file)
Binary files a/src/examples/images/test.tvg and b/src/examples/images/test.tvg differ
index ddf8f16..a63c46e 100644 (file)
@@ -198,7 +198,7 @@ TvgBinCounter TvgSaver::serializeFill(const Fill* fill, TvgBinTag tag)
 
     if (auto flag = static_cast<TvgBinFlag>(fill->spread()))
         cnt += writeTagProperty(TVG_TAG_FILL_FILLSPREAD, SIZE(TvgBinFlag), &flag);
-    cnt += writeTagProperty(TVG_TAG_FILL_COLORSTOPS, stopsCnt * sizeof(stops), stops);
+    cnt += writeTagProperty(TVG_TAG_FILL_COLORSTOPS, stopsCnt * sizeof(Fill::ColorStop), stops);
 
     writeReservedCount(cnt);