Title: [154767] trunk/Source/WebCore
Revision
154767
Author
[email protected]
Date
2013-08-28 12:41:12 -0700 (Wed, 28 Aug 2013)

Log Message

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

Patch by Lukasz Gajowy <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154766 => 154767)


--- trunk/Source/WebCore/ChangeLog	2013-08-28 19:24:50 UTC (rev 154766)
+++ trunk/Source/WebCore/ChangeLog	2013-08-28 19:41:12 UTC (rev 154767)
@@ -1,3 +1,15 @@
+2013-08-28  Lukasz Gajowy  <[email protected]>
+
+        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  <[email protected]>
 
         Document::elementSheet() should return a reference

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (154766 => 154767)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2013-08-28 19:24:50 UTC (rev 154766)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2013-08-28 19:41:12 UTC (rev 154767)
@@ -330,7 +330,12 @@
 
     // 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());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to