From 1ce4cc6d90cb5f3724790248a866a459c5f27651 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 8 Nov 2021 15:05:16 +0900 Subject: [PATCH] tvg_saver TvgSaver: Initialize local value If paint has no path information or stroke information, it is not referenced inside bounds. This will access the uninitialized variable at line 759, 760. --- src/savers/tvg/tvgTvgSaver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/savers/tvg/tvgTvgSaver.cpp b/src/savers/tvg/tvgTvgSaver.cpp index e206994..d7c9798 100644 --- a/src/savers/tvg/tvgTvgSaver.cpp +++ b/src/savers/tvg/tvgTvgSaver.cpp @@ -752,6 +752,7 @@ bool TvgSaver::save(Paint* paint, const string& path, bool compress) if (!this->path) return false; float x, y; + x = y = 0; paint->bounds(&x, &y, &vsize[0], &vsize[1], false); //cut off the negative space -- 2.7.4