diff options
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageDecoder_libjpeg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index 6a3ae87b6a..89bfefcd45 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -509,6 +509,8 @@ SkImageDecoder::Result SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* for (int y = 0;; y++) { JSAMPLE* rowptr = (JSAMPLE*)srcRow; int row_count = jpeg_read_scanlines(&cinfo, &rowptr, 1); + sk_msan_mark_initialized(srcRow, srcRow + cinfo.output_width * srcBytesPerPixel, + "skbug.com/4550"); if (0 == row_count) { // if row_count == 0, then we didn't get a scanline, // so return early. We will return a partial image. @@ -525,8 +527,6 @@ SkImageDecoder::Result SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* convert_CMYK_to_RGB(srcRow, cinfo.output_width); } - sk_msan_mark_initialized(srcRow, srcRow + cinfo.output_width * srcBytesPerPixel, - "skbug.com/4550"); sampler.next(srcRow); if (bm->height() - 1 == y) { |