CodeQL library for C/C++
Search

Module FileClosed

Import path

import Critical.FileClosed

Imports

PointsTo

Provides classes and predicates implementing a points-to analysis based on Steensgaard’s algorithm, extended to support fields.

Predicates

closed

Holds if there exists a call to a function that might close the file specified by e.

fopenCallMayBeClosed

Holds if fc is a call to a function that opens a file that might be closed. For example: FILE* f = fopen("file.txt", "r"); ... fclose(f);

Classes

ClosedExpr

An expression for which there exists a function call that might close it.