Commit f16d7d29 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Check for valid frame number when processing the debugger frame request.

BUG=1250705
Review URL: http://codereview.chromium.org/18492

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e8010207
......@@ -1366,7 +1366,12 @@ DebugCommandProcessor.prototype.frameRequest_ = function(request, response) {
}
// With no arguments just keep the selected frame.
if (request.arguments && request.arguments.number >= 0) {
if (request.arguments) {
index = request.arguments.number;
if (index < 0 || this.exec_state_.frameCount() <= index) {
return response.failed('Invalid frame number');
}
this.exec_state_.setSelectedFrame(request.arguments.number);
}
response.body = this.exec_state_.frame();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment