Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3315d76

Browse files
committed
C#: Introduce negative summary column count validation.
1 parent 4c59cfb commit 3315d76

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

csharp/ql/lib/semmle/code/csharp/dataflow/CsvValidation.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ private string getInvalidModelColumnCount() {
8181
sinkModel(row) and expect = 9 and pred = "sink"
8282
or
8383
summaryModel(row) and expect = 10 and pred = "summary"
84+
or
85+
negativeSummaryModel(row) and expect = 5 and pred = "negative summary"
8486
|
8587
exists(int cols |
8688
cols = 1 + max(int n | exists(row.splitAt(";", n))) and
@@ -107,7 +109,7 @@ query predicate invalidModelRow(string msg) {
107109
or
108110
negativeSummaryModel(namespace, type, name, signature, provenance) and
109111
ext = "" and
110-
pred = "nonesummary"
112+
pred = "negative summary"
111113
|
112114
not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and
113115
msg = "Dubious namespace \"" + namespace + "\" in " + pred + " model."

0 commit comments

Comments
 (0)