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

Unified Diff: pdf/instance.cc

Issue 691273003: PDF: Fix potential bad indexes in find results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 6 years, 2 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 | pdf/out_of_process_instance.cc » ('j') | pdf/pdfium/pdfium_engine.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 4bd2f787dfec69d80534de5f9686dc5e619f32b9..e187378b90d730966242ee105b397af744d13886 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -1285,6 +1285,7 @@ void Instance::NotifyNumberOfFindResultsChanged(int total, bool final_result) {
}
void Instance::NotifySelectedFindResultChanged(int current_find_index) {
+ DCHECK_GE(current_find_index, 0);
SelectedFindResultChanged(current_find_index);
}
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | pdf/pdfium/pdfium_engine.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698