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

Unified Diff: ppapi/cpp/private/find_private.cc

Issue 1365563003: Prevent guest views from issuing a search for empty text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: parens Created 5 years, 1 month 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 | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/find_private.cc
diff --git a/ppapi/cpp/private/find_private.cc b/ppapi/cpp/private/find_private.cc
index 2765ae02eb1818d748d9e774dc4dafe7fdb1f31e..97a02bc1a78e2bc1146aa55a9243a4c8edac737a 100644
--- a/ppapi/cpp/private/find_private.cc
+++ b/ppapi/cpp/private/find_private.cc
@@ -26,6 +26,10 @@ PP_Bool StartFind(PP_Instance instance,
void* object = Instance::GetPerInstanceObject(instance, kPPPFindInterface);
if (!object)
return PP_FALSE;
+ if (!text || text[0] == '\0') {
+ PP_NOTREACHED();
+ return PP_FALSE;
+ }
bool return_value = static_cast<Find_Private*>(object)->StartFind(
text, PP_ToBool(case_sensitive));
return PP_FromBool(return_value);
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698