File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
cpp/ql/src/experimental/Security/CWE/CWE-243 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 13
13
14
14
import cpp
15
15
16
- /** Holds if a `fc` function call is available before or before a `chdir` function call. */
16
+ /** Holds if a `fc` function call is available before or after a `chdir` function call. */
17
17
predicate inExistsChdir ( FunctionCall fcp ) {
18
18
exists ( FunctionCall fctmp |
19
19
(
54
54
not inExistsChdir ( fctmp ) and
55
55
not outExistsChdir ( fctmp )
56
56
) and
57
- msg = "Creation of chroot Jail Without Changing Working Directory out "
57
+ msg = "Creation of ' chroot' jail without changing the working directory "
58
58
or
59
59
(
60
60
fc .getTarget ( ) .hasGlobalOrStdName ( "chdir" ) or
65
65
not exists ( ReturnStmt rttmp | rttmp .getExpr ( ) .getAChild * ( ) = fc ) and
66
66
not exists ( Assignment astmp | astmp .getAChild * ( ) = fc ) and
67
67
not exists ( Initializer ittmp | ittmp .getExpr ( ) .getAChild * ( ) = fc ) and
68
- not fc . isInMacroExpansion ( ) and
69
- msg = fc .getTarget ( ) .getName ( ) + " unchecked return value ."
68
+ not isFromMacroDefinition ( fc )
69
+ msg = "Unchecked return value for call to '" + fc .getTarget ( ) .getName ( ) + "' ."
70
70
select fc , msg
You can’t perform that action at this time.
0 commit comments