commit | 9e99d08470c455d3ea8fc73e01a244d492fff989 | [log] [tgz] |
---|---|---|
author | Garret Rieger <grieger@google.com> | Thu Sep 08 23:19:02 2022 +0000 |
committer | Garret Rieger <grieger@google.com> | Thu Dec 01 20:17:41 2022 +0000 |
tree | 7a1496bbe5ae1cbf4204ac974223a70b5af9ecfe | |
parent | edf7a29595f01bf5548587476b37efdc24c500f1 [diff] [blame] |
[repacker] validate link widths during repacker setup.
diff --git a/src/graph/graph.hh b/src/graph/graph.hh index 8a947ab..825a355 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh
@@ -58,6 +58,13 @@ unsigned start = l.position; unsigned end = start + l.width - 1; + if (unlikely (l.width < 2 || l.width > 4)) + { + DEBUG_MSG (SUBSET_REPACK, nullptr, + "Invalid graph. Invalid link width."); + return false; + } + if (unlikely (end >= table_size ())) { DEBUG_MSG (SUBSET_REPACK, nullptr,