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

Unified Diff: ppapi/proxy/raw_var_data.cc

Issue 2705933002: Check that a valid RawVarData has been created before calling a function on it (Closed)
Patch Set: Created 3 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
« 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/proxy/raw_var_data.cc
diff --git a/ppapi/proxy/raw_var_data.cc b/ppapi/proxy/raw_var_data.cc
index 9dbd75bcf3ff91fb7dbeea24b440b9c89569148f..117e35672f7b83b41126645b6180f1975e138230 100644
--- a/ppapi/proxy/raw_var_data.cc
+++ b/ppapi/proxy/raw_var_data.cc
@@ -198,6 +198,8 @@ std::unique_ptr<RawVarDataGraph> RawVarDataGraph::Read(
return nullptr;
PP_VarType var_type = static_cast<PP_VarType>(type);
result->data_.push_back(base::WrapUnique(RawVarData::Create(var_type)));
+ if (!result->data_.back())
+ return nullptr;
if (!result->data_.back()->Read(var_type, m, iter))
return nullptr;
}
« 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