Skip to content

Commit cf72fde

Browse files
committed
Fixing cross product in getPropertyAsGraphString (parameter root not bound in all cases, fixing using a bindingetset)
1 parent 32d29ff commit cf72fde

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • shared/cryptography/codeql/cryptography

shared/cryptography/codeql/cryptography/Model.qll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
3232
UnknownPropertyValue() { this = "<unknown>" }
3333
}
3434

35+
bindingset[root]
3536
private string getPropertyAsGraphString(NodeBase node, string key, Location root) {
3637
result =
3738
strictconcat(any(string value, Location location, string parsed |
3839
node.properties(key, value, location) and
39-
if location = root or location instanceof UnknownLocation
40-
then parsed = value
41-
else parsed = "(" + value + "," + location.toString() + ")"
40+
(
41+
if location = root or location instanceof UnknownLocation
42+
then parsed = value
43+
else parsed = "(" + value + "," + location.toString() + ")"
44+
)
4245
|
4346
parsed
4447
), ","

0 commit comments

Comments
 (0)