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

Unified Diff: ui/base/ime/win/tsf_text_store.cc

Issue 23819038: Fix a NULL pointer access bug in TSFTextStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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: ui/base/ime/win/tsf_text_store.cc
diff --git a/ui/base/ime/win/tsf_text_store.cc b/ui/base/ime/win/tsf_text_store.cc
index ce566890b3f8fc5c6099dc5b09219f0c2ad6e3f5..c6f9f53b70f4f4d66a907850d7382dabe56de0d4 100644
--- a/ui/base/ime/win/tsf_text_store.cc
+++ b/ui/base/ime/win/tsf_text_store.cc
@@ -585,6 +585,8 @@ STDMETHODIMP TSFTextStore::RequestSupportedAttrs(
const TS_ATTRID* attribute_buffer) {
if (!attribute_buffer)
return E_INVALIDARG;
+ if (!text_input_client_)
+ return E_FAIL;
// We support only input scope attribute.
for (size_t i = 0; i < attribute_buffer_size; ++i) {
if (IsEqualGUID(GUID_PROP_INPUTSCOPE, attribute_buffer[i]))
@@ -601,6 +603,8 @@ STDMETHODIMP TSFTextStore::RetrieveRequestedAttrs(
return E_INVALIDARG;
if (!attribute_buffer)
return E_INVALIDARG;
+ if (!text_input_client_)
+ return E_UNEXPECTED;
// We support only input scope attribute.
*attribute_buffer_copied = 0;
if (attribute_buffer_size == 0)
« 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