Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: remoting/host/chromeos/skia_bitmap_desktop_frame.cc

Issue 1216403004: Avoid unspecified behavior in SkiaBitmapDesktopFrame::Create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromeos/skia_bitmap_desktop_frame.cc
diff --git a/remoting/host/chromeos/skia_bitmap_desktop_frame.cc b/remoting/host/chromeos/skia_bitmap_desktop_frame.cc
index d32f387e2cf14426f64cdba7052488d1d16e101d..9be841f2d092822b43b44b4bcc97f632badfe5a6 100644
--- a/remoting/host/chromeos/skia_bitmap_desktop_frame.cc
+++ b/remoting/host/chromeos/skia_bitmap_desktop_frame.cc
@@ -19,8 +19,9 @@ SkiaBitmapDesktopFrame* SkiaBitmapDesktopFrame::Create(
uint8_t* bitmap_data = reinterpret_cast<uint8_t*>(bitmap->getPixels());
bitmap->unlockPixels();
+ const size_t row_bytes = bitmap->rowBytes();
SkiaBitmapDesktopFrame* result = new SkiaBitmapDesktopFrame(
- size, bitmap->rowBytes(), bitmap_data, bitmap.Pass());
+ size, row_bytes, bitmap_data, bitmap.Pass());
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698