Index: src/codec/SkJpegCodec.cpp |
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp |
index 6f7af49975d1d827953938a7e0b18a1d123d5849..a4ad76651797e1e99dd2c0742e97212d3896339b 100644 |
--- a/src/codec/SkJpegCodec.cpp |
+++ b/src/codec/SkJpegCodec.cpp |
@@ -188,6 +188,7 @@ SkISize SkJpegCodec::onGetScaledDimensions(float desiredScale) const { |
// 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; |