Commit c760918e authored by noamsml@chromium.org's avatar noamsml@chromium.org

[Privet Filesystem] Fix null dereference

Fix null dereference issue in privet filesystem if listing a directory errors
out. Instead, signal an error.

BUG=

Review URL: https://codereview.chromium.org/180733006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255430 0039d316-1c4b-4281-b951-d872f2087c98
parent 184892f2
...@@ -149,15 +149,15 @@ void PrivetFileSystemListOperation::OnStorageListResult( ...@@ -149,15 +149,15 @@ void PrivetFileSystemListOperation::OnStorageListResult(
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
list_operation_.reset(); list_operation_.reset();
attribute_cache_->AddFileInfoFromJSON(full_path_, value);
fileapi::AsyncFileUtil::EntryList entry_list;
if (!value) { if (!value) {
SignalError(); SignalError();
return; return;
} }
attribute_cache_->AddFileInfoFromJSON(full_path_, value);
fileapi::AsyncFileUtil::EntryList entry_list;
const base::ListValue* entries; const base::ListValue* entries;
if (!value->GetList(kPrivetListEntries, &entries)) { if (!value->GetList(kPrivetListEntries, &entries)) {
SignalError(); SignalError();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment