Skip to content

Commit 0773ab3

Browse files
committed
Use matches to check for 0x prefix
1 parent 92d9e51 commit 0773ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Security/CWE/CWE-732/FilePermissions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import semmle.code.cpp.commons.unix.Constants
33

44
bindingset[input]
55
int parseHex(string input) {
6-
input.prefix(2) = "0x" and
6+
input.matches("0x%") and
77
result =
88
strictsum(int ix |
99
ix in [2 .. input.length()]

0 commit comments

Comments
 (0)