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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc

Issue 10834009: Coverity fix: Dereference after null check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc b/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc
index f8c79fafcc7f7cb3dd3413a42b6c627e9c73047f..b87580a0bd66870c61232a592df6c113e3f9da23 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc
@@ -67,7 +67,7 @@ void PnaclStreamingTranslateThread::PutBytes(std::vector<char>* bytes,
bytes->resize(count);
}
NaClXMutexLock(&cond_mu_);
- if (count == PP_OK || count < 0) {
+ if (count == PP_OK || count < 0 || bytes == NULL) {
done_ = true;
} else {
data_buffers_.push_back(std::vector<char>());
« 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