Skip to content

Commit fcc1938

Browse files
committed
[zlaski/memset-model] Ctrl+Shift+F.
1 parent 2ca52a4 commit fcc1938

File tree

1 file changed

+7
-5
lines changed
  • cpp/ql/src/semmle/code/cpp/models/implementations

1 file changed

+7
-5
lines changed

cpp/ql/src/semmle/code/cpp/models/implementations/Memset.qll

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ class MemsetFunction extends ArrayFunction, DataFlowFunction, AliasFunction, Sid
3939
override predicate parameterIsAlwaysReturned(int index) {
4040
not hasGlobalName("bzero") and index = 0
4141
}
42-
42+
4343
override predicate hasOnlySpecificReadSideEffects() { any() }
44+
4445
override predicate hasOnlySpecificWriteSideEffects() { any() }
45-
46+
4647
override predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) {
4748
i = 0 and buffer = true and mustWrite = true
4849
}
49-
50-
override ParameterIndex getParameterSizeIndex(ParameterIndex i) {
51-
i = 0 and if hasGlobalName("bzero") then result = 1 else result = 2
50+
51+
override ParameterIndex getParameterSizeIndex(ParameterIndex i) {
52+
i = 0 and
53+
if hasGlobalName("bzero") then result = 1 else result = 2
5254
}
5355
}

0 commit comments

Comments
 (0)