fix all ql/counting-to-zero in some languages

This commit is contained in:
Erik Krogh Kristensen
2022-05-09 11:17:24 +02:00
parent 7149b98bb4
commit 94a9b3e873
3 changed files with 4 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ class ExtractAllSink extends TaintSink {
ExtractAllSink() {
this = call.getFunction().(AttrNode).getObject("extractall") and
count(call.getAnArg()) = 0
not exists(call.getAnArg())
}
override predicate sinks(TaintKind kind) { kind instanceof OpenTarFile }

View File

@@ -194,7 +194,7 @@ predicate function_object_consistency(string clsname, string problem, string wha
exists(FunctionObject func | clsname = func.getAQlClass() |
what = func.getName() and
(
count(func.descriptiveString()) = 0 and problem = "no descriptiveString()"
not exists(func.descriptiveString()) and problem = "no descriptiveString()"
or
exists(int c | c = strictcount(func.descriptiveString()) and c > 1 |
problem = c + "descriptiveString()s"