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

Unified Diff: services/catalog/reader.cc

Issue 2284843002: Fix nullptr dereference in service catalog (Closed)
Patch Set: Created 4 years, 4 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: services/catalog/reader.cc
diff --git a/services/catalog/reader.cc b/services/catalog/reader.cc
index afa5272b5630462f005b301e8930831b88a825f0..08a8a918f98934cd33a809d6c4a59ddbd48da549 100644
--- a/services/catalog/reader.cc
+++ b/services/catalog/reader.cc
@@ -208,6 +208,8 @@ void Reader::OnReadManifest(
EntryCache* cache,
const CreateEntryForNameCallback& entry_created_callback,
std::unique_ptr<Entry> entry) {
+ if (!entry)
+ return;
shell::mojom::ResolveResultPtr result =
shell::mojom::ResolveResult::From(*entry);
AddEntryToCache(cache, std::move(entry));
« 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