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

Unified Diff: content/common/cursors/webcursor.cc

Issue 924843002: Fix for possible crashes due to pointer value being null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: content/common/cursors/webcursor.cc
diff --git a/content/common/cursors/webcursor.cc b/content/common/cursors/webcursor.cc
index 85721fdd0e2bae52ef010ff19ae60df6eb764d36..b9ab178543e47273bc8d80189d97698e73eb3ef5 100644
--- a/content/common/cursors/webcursor.cc
+++ b/content/common/cursors/webcursor.cc
@@ -142,8 +142,10 @@ bool WebCursor::Serialize(Pickle* pickle) const {
return false;
const char* data = NULL;
- if (!custom_data_.empty())
- data = &custom_data_[0];
+ if (custom_data_.empty())
+ return false;
Charlie Reis 2015/02/17 21:26:59 This is probably the wrong thing to do. It's prob
Sunil Ratnu 2015/02/18 09:04:45 Removed this change as we do not need to abort ear
+
+ data = &custom_data_[0];
if (!pickle->WriteData(data, custom_data_.size()))
return false;

Powered by Google App Engine
This is Rietveld 408576698