We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94a05c4 commit 0f6e747Copy full SHA for 0f6e747
1 file changed
c/common/src/codingstandards/c/OutOfBounds.qll
@@ -968,6 +968,7 @@ module OOB {
968
/**
969
* Holds if `arg` refers to the number of characters excluding a null terminator
970
*/
971
+ bindingset[fc, arg]
972
private predicate isArgNumCharacters(BufferAccessLibraryFunctionCall fc, Expr arg) {
973
exists(int i |
974
arg = fc.getArgument(i) and
@@ -979,6 +980,7 @@ module OOB {
979
980
* Returns '1' if `arg` refers to the number of characters excluding a null terminator,
981
* otherwise '0' if `arg` refers to the number of characters including a null terminator.
982
983
984
private int argNumCharactersOffset(BufferAccess fc, Expr arg) {
985
if isArgNumCharacters(fc, arg) then result = 1 else result = 0
986
}
0 commit comments