Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
O_CREAT
O_TMPFILE
1 parent e1ca5dd commit 4d03082Copy full SHA for 4d03082
1 file changed
cpp/ql/src/Security/CWE/CWE-732/FilePermissions.qll
@@ -15,15 +15,21 @@ int parseHex(string input) {
15
}
16
17
int o_creat() {
18
- exists(Macro m | m.getName() = "O_CREAT" |
19
- result = parseHex(m.getBody()) or result = UnixConstants::parseOctal(m.getBody())
20
- )
+ result =
+ unique(int v |
+ exists(Macro m | m.getName() = "O_CREAT" |
21
+ v = parseHex(m.getBody()) or v = UnixConstants::parseOctal(m.getBody())
22
+ )
23
24
25
26
int o_tmpfile() {
- exists(Macro m | m.getName() = "O_TMPFILE" |
27
28
29
+ exists(Macro m | m.getName() = "O_TMPFILE" |
30
31
32
33
34
35
bindingset[n, digit]
0 commit comments