Skip to content

Commit e90f505

Browse files
fix changed file
1 parent bb9f13e commit e90f505

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/drivers/general/queries/PoolTagIntegral/PoolTagIntegral.ql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ class ValidPoolTag extends Expr {
4242
}
4343
}
4444

45-
from FunctionCall fc
45+
from FunctionCall fc, int i
4646
where
47-
fc.getTarget() instanceof PoolTypeFunction
48-
49-
select fc,fc.toString()
47+
fc.getTarget() instanceof PoolTypeFunction and
48+
fc.getTarget().getParameter(i).getName().matches("Tag") and
49+
not fc.getArgument(i) instanceof ValidPoolTag
50+
select fc,
51+
"A non-CHAR tag was passed into a pool allocation function (actual type: " +
52+
fc.getArgument(i).getUnderlyingType().getName() + ")"

0 commit comments

Comments
 (0)