[repacker] check duplicate() for success.
Fixes fuzzer testcase https://oss-fuzz.com/testcase-detail/5475787333828608.
This commit is contained in:
parent
6b72a4ddb0
commit
e4fff64ce3
|
@ -700,6 +700,9 @@ struct graph_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_error ())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!made_changes)
|
if (!made_changes)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -833,7 +836,11 @@ struct graph_t
|
||||||
if (index_map.has (node_idx))
|
if (index_map.has (node_idx))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
index_map.set (node_idx, duplicate (node_idx));
|
unsigned clone_idx = duplicate (node_idx);
|
||||||
|
if (!check_success (clone_idx != (unsigned) -1))
|
||||||
|
return;
|
||||||
|
|
||||||
|
index_map.set (node_idx, clone_idx);
|
||||||
for (const auto& l : object (node_idx).all_links ()) {
|
for (const auto& l : object (node_idx).all_links ()) {
|
||||||
duplicate_subgraph (l.objidx, index_map);
|
duplicate_subgraph (l.objidx, index_map);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue