mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Java/C#: Address review comments.
This commit is contained in:
@@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
|
|||||||
|
|
||||||
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
|
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
|
||||||
|
|
||||||
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
|
private string getContent(PropagateContentFlow::AccessPath ap, int i) {
|
||||||
not exists(ap.getHead()) and result = ""
|
|
||||||
or
|
|
||||||
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
||||||
head = ap.getHead() and
|
head = ap.getHead() and
|
||||||
tail = ap.getTail() and
|
tail = ap.getTail()
|
||||||
result = "." + printContent(head) + printStoreAccessPath(tail)
|
|
|
||||||
|
i = 0 and
|
||||||
|
result = "." + printContent(head)
|
||||||
|
or
|
||||||
|
i > 0 and result = getContent(tail, i - 1)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
|
||||||
|
result = concat(int i | | getContent(ap, i), "" order by i)
|
||||||
|
}
|
||||||
|
|
||||||
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
|
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
|
||||||
not exists(ap.getHead()) and result = ""
|
result = concat(int i | | getContent(ap, i), "" order by i desc)
|
||||||
or
|
|
||||||
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
|
||||||
head = ap.getHead() and
|
|
||||||
tail = ap.getTail() and
|
|
||||||
result = printReadAccessPath(tail) + "." + printContent(head)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string captureContentFlow(DataFlowSummaryTargetApi api) {
|
string captureContentFlow(DataFlowSummaryTargetApi api) {
|
||||||
|
|||||||
@@ -279,24 +279,24 @@ private module PropagateContentFlowConfig implements ContentDataFlow::ConfigSig
|
|||||||
|
|
||||||
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
|
private module PropagateContentFlow = ContentDataFlow::Global<PropagateContentFlowConfig>;
|
||||||
|
|
||||||
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
|
private string getContent(PropagateContentFlow::AccessPath ap, int i) {
|
||||||
not exists(ap.getHead()) and result = ""
|
|
||||||
or
|
|
||||||
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
||||||
head = ap.getHead() and
|
head = ap.getHead() and
|
||||||
tail = ap.getTail() and
|
tail = ap.getTail()
|
||||||
result = "." + printContent(head) + printStoreAccessPath(tail)
|
|
|
||||||
|
i = 0 and
|
||||||
|
result = "." + printContent(head)
|
||||||
|
or
|
||||||
|
i > 0 and result = getContent(tail, i - 1)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string printStoreAccessPath(PropagateContentFlow::AccessPath ap) {
|
||||||
|
result = concat(int i | | getContent(ap, i), "" order by i)
|
||||||
|
}
|
||||||
|
|
||||||
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
|
private string printReadAccessPath(PropagateContentFlow::AccessPath ap) {
|
||||||
not exists(ap.getHead()) and result = ""
|
result = concat(int i | | getContent(ap, i), "" order by i desc)
|
||||||
or
|
|
||||||
exists(ContentSet head, PropagateContentFlow::AccessPath tail |
|
|
||||||
head = ap.getHead() and
|
|
||||||
tail = ap.getTail() and
|
|
||||||
result = printReadAccessPath(tail) + "." + printContent(head)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string captureContentFlow(DataFlowSummaryTargetApi api) {
|
string captureContentFlow(DataFlowSummaryTargetApi api) {
|
||||||
|
|||||||
Reference in New Issue
Block a user