Skip to content

Commit aa46513

Browse files
committed
Fix naming conflicts in cpp/world-writable-file-creation
1 parent f325003 commit aa46513

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212

1313
import cpp
1414
import FilePermissions
15-
import semmle.code.cpp.commons.unix.Constants
1615

1716
predicate worldWritableCreation(FileCreationExpr fc, int mode) {
1817
mode = localUmask(fc).mask(fc.getMode()) and
19-
sets(mode, s_iwoth())
18+
sets(mode, UnixConstants::s_iwoth())
2019
}
2120

2221
predicate setWorldWritable(FunctionCall fc, int mode) {
2322
fc.getTarget().getName() = ["chmod", "fchmod", "_chmod", "_wchmod"] and
2423
mode = fc.getArgument(1).getValue().toInt() and
25-
sets(mode, s_iwoth())
24+
sets(mode, UnixConstants::s_iwoth())
2625
}
2726

2827
from Expr fc, int mode, string message

0 commit comments

Comments
 (0)