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
This commit is contained in:
parent
0b71278679
commit
f7aaadb570
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user