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

Unified Diff: runtime/vm/service.cc

Issue 2298773003: Fix an off-by-one error in vmservice expression evaluation. (Closed)
Patch Set: Created 4 years, 4 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: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 104d22c4bb448658f790e8c91288bf5047522100..d35f0e147f42af9a33dac52f31623cf8d6a56f6c 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2306,7 +2306,7 @@ static bool EvaluateInFrame(Thread* thread, JSONStream* js) {
}
DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
intptr_t framePos = UIntParameter::Parse(js->LookupParam("frameIndex"));
- if (framePos > stack->Length()) {
+ if (framePos >= stack->Length()) {
PrintInvalidParamError(js, "frameIndex");
return true;
}
« 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