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

Unified Diff: ui/accessibility/ax_tree_unittest.cc

Issue 2377443002: Fix another bug in AXTree caught by libfuzzer (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/accessibility/ax_tree.cc ('K') | « ui/accessibility/ax_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree_unittest.cc
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
index 5e8bdcd232106edf5ded355f162dfcda744848ba..8e0bc015b36db23ca112738ccc4533f0f1470142 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -508,4 +508,24 @@ TEST(AXTreeTest, BogusAXTree2) {
tree.Unserialize(initial_state);
}
+// UAF caught by ax_tree_fuzzer
+TEST(AXTreeTest, BogusAXTree3) {
+ AXTreeUpdate initial_state;
+ AXNodeData node3;
aboxhall 2016/09/26 20:24:44 Why node3 and node4 here?
dmazzoni 2016/09/27 20:19:26 Minimized from a larger example, didn't rename. Ch
+ node3.id = 0;
+ node3.state = 0;
+ node3.child_ids.push_back(1);
+ initial_state.nodes.push_back(node3);
+
+ AXNodeData node4;
+ node4.id = 1;
+ node4.state = 0;
+ node4.child_ids.push_back(1);
aboxhall 2016/09/26 20:24:44 Is this what causes the crash? Does it crash if no
dmazzoni 2016/09/27 20:19:26 No, that didn't crash. This was the minimal case t
aboxhall 2016/09/28 19:23:28 Ohhh right, because it tries to remove it from nod
+ node4.child_ids.push_back(1);
+ initial_state.nodes.push_back(node4);
+
+ ui::AXTree tree;
+ tree.Unserialize(initial_state);
+}
+
} // namespace ui
« ui/accessibility/ax_tree.cc ('K') | « ui/accessibility/ax_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698