Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
AX:Null pointer may be dereferenced.
https://bugs.webkit.org/show_bug.cgi?id=120300

Patch by Lukasz Gajowy <l.gajowy@samsung.com> on 2013-08-28
Reviewed by Chris Fleizach.

Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):

Canonical link: https://commits.webkit.org/138407@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Lukasz Gajowy authored and webkit-commit-queue committed Aug 28, 2013
1 parent 87c9a34 commit 748a536
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
2013-08-28 Lukasz Gajowy <l.gajowy@samsung.com>

AX:Null pointer may be dereferenced.
https://bugs.webkit.org/show_bug.cgi?id=120300

Reviewed by Chris Fleizach.

Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):

2013-08-28 Pratik Solanki <psolanki@apple.com>

Document::elementSheet() should return a reference
Expand Down
7 changes: 6 additions & 1 deletion Source/WebCore/accessibility/AXObjectCache.cpp
Expand Up @@ -330,7 +330,12 @@ AccessibilityObject* AXObjectCache::getOrCreate(Widget* widget)

// Will crash later if we have two objects for the same widget.
ASSERT(!get(widget));


// Catch the case if an (unsupported) widget type is used. Only FrameView and ScrollBar are supported now.
ASSERT(newObj);
if (!newObj)
return 0;

getAXID(newObj.get());

m_widgetObjectMapping.set(widget, newObj->axObjectID());
Expand Down

0 comments on commit 748a536

Please sign in to comment.