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

Unified Diff: ui/accessibility/ax_tree_unittest.cc

Issue 2323103002: Add fuzzer for AXTree and fix a couple of bugs it found. (Closed)
Patch Set: Fix additional leak 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
« no previous file with comments | « ui/accessibility/ax_tree_fuzzer.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 78765beaa0721cea5b530fb961eebd078f1bdb59..5e8bdcd232106edf5ded355f162dfcda744848ba 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -479,4 +479,33 @@ TEST(AXTreeTest, TreeDelegateIsNotCalledForReparenting) {
tree.SetDelegate(NULL);
}
+// UAF caught by ax_tree_fuzzer
+TEST(AXTreeTest, BogusAXTree) {
+ AXTreeUpdate initial_state;
+ AXNodeData node;
+ node.id = 0;
+ node.state = 0;
+ initial_state.nodes.push_back(node);
+ initial_state.nodes.push_back(node);
+ ui::AXTree tree;
+ tree.Unserialize(initial_state);
+}
+
+// UAF caught by ax_tree_fuzzer
+TEST(AXTreeTest, BogusAXTree2) {
+ AXTreeUpdate initial_state;
+ AXNodeData node;
+ node.id = 0;
+ node.state = 0;
+ initial_state.nodes.push_back(node);
+ AXNodeData node2;
+ node2.id = 0;
+ node2.state = 0;
+ node2.child_ids.push_back(0);
+ node2.child_ids.push_back(0);
+ initial_state.nodes.push_back(node2);
+ ui::AXTree tree;
+ tree.Unserialize(initial_state);
+}
+
} // namespace ui
« no previous file with comments | « ui/accessibility/ax_tree_fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698