Skip to content

Commit 0f6e747

Browse files
author
Nikita Kraiouchkine
committed
Resolve performance issue in OutOfBounds.qll
1 parent 94a05c4 commit 0f6e747

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

c/common/src/codingstandards/c/OutOfBounds.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ module OOB {
968968
/**
969969
* Holds if `arg` refers to the number of characters excluding a null terminator
970970
*/
971+
bindingset[fc, arg]
971972
private predicate isArgNumCharacters(BufferAccessLibraryFunctionCall fc, Expr arg) {
972973
exists(int i |
973974
arg = fc.getArgument(i) and
@@ -979,6 +980,7 @@ module OOB {
979980
* Returns '1' if `arg` refers to the number of characters excluding a null terminator,
980981
* otherwise '0' if `arg` refers to the number of characters including a null terminator.
981982
*/
983+
bindingset[fc, arg]
982984
private int argNumCharactersOffset(BufferAccess fc, Expr arg) {
983985
if isArgNumCharacters(fc, arg) then result = 1 else result = 0
984986
}

0 commit comments

Comments
 (0)