Skip to content

Commit cf8fa83

Browse files
committed
C++: Clarify the note about file descriptors.
1 parent d86a0ab commit cf8fa83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ import semmle.code.cpp.controlflow.Guards
1919
* An operation on a filename that is likely to modify the corresponding file
2020
* and may return an indication of success.
2121
*
22-
* Note: we're not interested in operations on file descriptors, as they
23-
* are better behaved.
22+
* Note: we're not interested in operations where the file is specified by a
23+
* descriptor, rather than a filename, as they are better behaved. We are
24+
* interested in functions that take a filename and return a file descriptor,
25+
* however.
2426
*/
2527
FunctionCall filenameOperation(Expr path) {
2628
exists(string name | name = result.getTarget().getName() |

0 commit comments

Comments
 (0)