aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ivan Afanasyev <ivafanas@yandex-team.ru>2017-10-09 10:09:53 +0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-09 19:17:05 +0000
commit2631558d58a86b7904d05d368729d814a4ffe9d7 (patch)
tree80e3e67b366144694f06bd4f179e0d22e43e2882
parent7cf2fd6ff62378c5060d06a9699f3ff4510bdf53 (diff)
fix use of uninitialized flag in SkCodec
SkCodec class has the fStartedIncrementalDecode field, which is not initialized on construction, but may be used in incrementalDecode method being uninitialized. Bug: skia: Change-Id: I378412a375100ad2df4aa38f2dd5682867e0e34b Reviewed-on: https://skia-review.googlesource.com/53160 Commit-Queue: Heather Miller <hcm@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
-rw-r--r--AUTHORS1
-rw-r--r--src/codec/SkCodec.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index f4b36aa37f..6def302e3e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,6 +22,7 @@ Herb Derby <herbderby@gmail.com>
Igalia <*@igalia.com>
Intel <*@intel.com>
Ion Rosca <rosca@adobe.com>
+Ivan Afanasyev <ivafanas@yandex-team.ru>
Jacek Caban <cjacek@gmail.com>
Jeff Muizelaar <jmuizelaar@mozilla.com>
Lee Salzman <lsalzman@mozilla.com>
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index 9b55790db4..c3d99f2793 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -138,6 +138,7 @@ SkCodec::SkCodec(int width, int height, const SkEncodedInfo& info,
, fDstInfo()
, fOptions()
, fCurrScanline(-1)
+ , fStartedIncrementalDecode(false)
{}
SkCodec::SkCodec(const SkEncodedInfo& info, const SkImageInfo& imageInfo,
@@ -151,6 +152,7 @@ SkCodec::SkCodec(const SkEncodedInfo& info, const SkImageInfo& imageInfo,
, fDstInfo()
, fOptions()
, fCurrScanline(-1)
+ , fStartedIncrementalDecode(false)
{}
SkCodec::~SkCodec() {}