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

Unified Diff: ppapi/tests/test_graphics_2d.cc

Issue 14087009: Verify that the image is not empty before calling memset(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@missing-include-for-epoll-io
Patch Set: Created 7 years, 8 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: ppapi/tests/test_graphics_2d.cc
diff --git a/ppapi/tests/test_graphics_2d.cc b/ppapi/tests/test_graphics_2d.cc
index 7377736b47fdea9069a53e1c0d6e3727f6785587..23a4fe76fb41abaa9499cfc3de74fd0c8bb089eb 100644
--- a/ppapi/tests/test_graphics_2d.cc
+++ b/ppapi/tests/test_graphics_2d.cc
@@ -321,6 +321,7 @@ std::string TestGraphics2D::TestInitToZero() {
pp::ImageData image(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
pp::Size(w, h), true);
ASSERT_FALSE(image.is_null());
+ ASSERT_FALSE(image.size().IsEmpty());
memset(image.data(), 0xFF, image.stride() * image.size().height() * 4);
// Read out the initial data from the device & check.
« 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