| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/accessibility/ax_tree.h" | 5 #include "ui/accessibility/ax_tree.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 AXNodeData node2; | 501 AXNodeData node2; |
| 502 node2.id = 0; | 502 node2.id = 0; |
| 503 node2.state = 0; | 503 node2.state = 0; |
| 504 node2.child_ids.push_back(0); | 504 node2.child_ids.push_back(0); |
| 505 node2.child_ids.push_back(0); | 505 node2.child_ids.push_back(0); |
| 506 initial_state.nodes.push_back(node2); | 506 initial_state.nodes.push_back(node2); |
| 507 ui::AXTree tree; | 507 ui::AXTree tree; |
| 508 tree.Unserialize(initial_state); | 508 tree.Unserialize(initial_state); |
| 509 } | 509 } |
| 510 | 510 |
| 511 // UAF caught by ax_tree_fuzzer |
| 512 TEST(AXTreeTest, BogusAXTree3) { |
| 513 AXTreeUpdate initial_state; |
| 514 AXNodeData node; |
| 515 node.id = 0; |
| 516 node.state = 0; |
| 517 node.child_ids.push_back(1); |
| 518 initial_state.nodes.push_back(node); |
| 519 |
| 520 AXNodeData node2; |
| 521 node2.id = 1; |
| 522 node2.state = 0; |
| 523 node2.child_ids.push_back(1); |
| 524 node2.child_ids.push_back(1); |
| 525 initial_state.nodes.push_back(node2); |
| 526 |
| 527 ui::AXTree tree; |
| 528 tree.Unserialize(initial_state); |
| 529 } |
| 530 |
| 511 } // namespace ui | 531 } // namespace ui |
| OLD | NEW |