Skip to content

Commit 41f7138

Browse files
committed
Shared: Make sure getMadRepresentation is unique
1 parent 30ab9b7 commit 41f7138

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,11 @@ module Make<
686686
derivedFluentFlowPush(_, _, _, head, tail, _)
687687
}
688688

689+
pragma[nomagic]
690+
private string getUniqueMadRepresentation(SummaryComponent c) {
691+
result = strictconcat(string s | s = c.getMadRepresentation() | s, "/")
692+
}
693+
689694
/**
690695
* A (non-empty) stack of summary components.
691696
*
@@ -732,7 +737,7 @@ module Make<
732737
exists(SummaryComponent head, SummaryComponentStack tail |
733738
head = this.head() and
734739
tail = this.tail() and
735-
result = tail.getMadRepresentation() + "." + head.getMadRepresentation()
740+
result = tail.getMadRepresentation() + "." + getUniqueMadRepresentation(head)
736741
)
737742
or
738743
exists(SummaryComponent c |

0 commit comments

Comments
 (0)