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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8c60b801
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
......@@ -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());
......
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