Index: src/images/SkImageDecoder_libjpeg.cpp |
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp |
index 6a3ae87b6a113da85e3291d7a91e3526ffde5140..89bfefcd45f2ae68b98a7d6030fbac7f9a7f0eef 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) { |