Index: chrome/common/jpeg_codec.cc |
=================================================================== |
--- chrome/common/jpeg_codec.cc (revision 2299) |
+++ chrome/common/jpeg_codec.cc (working copy) |
@@ -514,7 +514,7 @@ |
SkBitmap* bitmap = new SkBitmap(); |
bitmap->setConfig(SkBitmap::kARGB_8888_Config, w, h); |
bitmap->allocPixels(); |
- memcpy(bitmap->getAddr32(0, 0), &data_vector[0], w * h * 4); |
+ memcpy(bitmap->getAddr32(0, 0), &data_vector[0], data_length); |
return bitmap; |
} |