Skip to content

Commit

Permalink
resource-query: fix segfault in graphml writer
Browse files Browse the repository at this point in the history
problem: we're indexing the graph with an end iterator for vertices,
which is invalid, instead of the current iterator for the edge we need

solution: use the correct iterator

fixes #1289
  • Loading branch information
trws committed Sep 4, 2024
1 parent 893e2dc commit 9b256aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resource/utilities/resource-query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ static void flatten (resource_graph_t &fg,
}
for (tie (ei, e_end) = edges (fg); ei != e_end; ++ei) {
esubsystems[*ei] = "{";
for (auto const &k : fg[*vi].idata.member_of.key_range ()) {
if (!fg[*vi].idata.member_of[k])
for (auto const &k : fg[*ei].idata.member_of.key_range ()) {
if (!fg[*ei].idata.member_of[k])
continue;
if (esubsystems[*ei].size () > 0)
esubsystems[*ei] += ",";
Expand Down

0 comments on commit 9b256aa

Please sign in to comment.