File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cpp/ql/src/Security/CWE/CWE-732 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ abstract class FileCreationWithOptionalModeExpr extends FileCreationExpr {
134
134
135
135
class OpenCreationExpr extends FileCreationWithOptionalModeExpr {
136
136
OpenCreationExpr ( ) {
137
- this .getTarget ( ) .getName ( ) = [ "open" , "_open" , "_wopen" ] and
137
+ this .getTarget ( ) .hasGlobalOrStdName ( [ "open" , "_open" , "_wopen" ] ) and
138
138
exists ( int flag | flag = this .getArgument ( 1 ) .getValue ( ) .toInt ( ) |
139
139
setsFlag ( flag , o_creat ( ) ) or setsFlag ( flag , o_tmpfile ( ) )
140
140
)
@@ -163,7 +163,7 @@ class CreatCreationExpr extends FileCreationExpr {
163
163
164
164
class OpenatCreationExpr extends FileCreationWithOptionalModeExpr {
165
165
OpenatCreationExpr ( ) {
166
- this .getTarget ( ) .getName ( ) = "openat" and
166
+ this .getTarget ( ) .hasGlobalOrStdName ( "openat" ) and
167
167
exists ( int flag | flag = this .getArgument ( 2 ) .getValue ( ) .toInt ( ) |
168
168
setsFlag ( flag , o_creat ( ) ) or setsFlag ( flag , o_tmpfile ( ) )
169
169
)
You can’t perform that action at this time.
0 commit comments