commit | f7aaadb570d56d34b0e364e65f9374a01665a528 | [log] [tgz] |
---|---|---|
author | mtklein <mtklein@chromium.org> | Thu Apr 16 06:09:27 2015 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Thu Apr 16 06:09:27 2015 -0700 |
tree | 3a0fd7f08876c16776c492d0cb3f52e12e0e3d51 | |
parent | 0b71278679f1ce2bdbabe117285bc1b3166d372a [diff] |
Zero jpeg_decompress_struct before calling jpeg_calc_output_dimensions(). https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/38/steps/dm/logs/stdio (Must have been https://codereview.chromium.org/1076923002 ?) BUG=skia: Review URL: https://codereview.chromium.org/1094603002
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index 6f7af49..a4ad766 100644 --- a/src/codec/SkJpegCodec.cpp +++ b/src/codec/SkJpegCodec.cpp
@@ -188,6 +188,7 @@ // Set up a fake decompress struct in order to use libjpeg to calculate output dimensions jpeg_decompress_struct dinfo; + sk_bzero(&dinfo, sizeof(dinfo)); dinfo.image_width = this->getInfo().width(); dinfo.image_height = this->getInfo().height(); dinfo.global_state = DSTATE_READY;