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

Issue 150061: Rework a loop in the native menu code to iterate over the vector of items we ... (Closed)

Created:
11 years, 5 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Rework a loop in the native menu code to iterate over the vector of items we have, rather than the actual system menu. I believe this may fix a crash where the code indexes out of bounds in the vector. The trouble is the assumption that the native menu index matches the index into the vector. If someone has installed a windows addon this may not be true. It's safer to restrict the iteration to the bounds of the vector and index into the menu based on that. http://crbug.com/14600 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19558

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M views/controls/menu/native_menu_win.cc View 1 chunk +6 lines, -5 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Ben Goodger (Google)
11 years, 5 months ago (2009-06-29 21:36:57 UTC) #1
sky
11 years, 5 months ago (2009-06-29 21:40:06 UTC) #2
OK

http://codereview.chromium.org/150061/diff/1/2
File views/controls/menu/native_menu_win.cc (right):

http://codereview.chromium.org/150061/diff/1/2#newcode357
Line 357: model_->GetLabelAt(model_index));
nit: align with (

Powered by Google App Engine
This is Rietveld 408576698