Possible null dereference of C++ variable? |
||
Issue description
I was looking through the code trying to see what might be going on in the crash in Issue 675854, and noticed that in permission_bubble_controller.mm, -showWindow: says the following:
if ([self hasVisibleLocationBar]) {
decoration_ = [[self.parentWindow windowController] locationBarBridge]
->GetPageInfoDecoration();
decoration_->SetActive(true);
}
There will be a crash if [[self.parentWindow windowController] locationBarBridge] returns nullptr, and as far as I can tell [self hasVisibleLocationBar] doesn't guarantee anything about what -locationBarBridge will return.
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b0f410e97c2f08f08f3e162bc995c7c4c237970 commit 2b0f410e97c2f08f08f3e162bc995c7c4c237970 Author: spqchan <spqchan@chromium.org> Date: Fri Mar 31 00:19:38 2017 [Mac] Fix a potential crash in the permission bubble controller BUG= 706489 Review-Url: https://codereview.chromium.org/2786943003 Cr-Commit-Position: refs/heads/master@{#460948} [modify] https://crrev.com/2b0f410e97c2f08f08f3e162bc995c7c4c237970/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm
,
Mar 31 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by spqc...@chromium.org
, Mar 30 2017