Skip to content

Commit 0568ed6

Browse files
authored
C++: Fix typo in MallocSizeExpr
The first argument is index 0, not 1.
1 parent 79811fc commit 0568ed6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class MallocSizeExpr extends BufferAccess, FunctionCall {
122122

123123
override Expr getPointer() { none() }
124124

125-
override Expr getAccessedLength() { result = getArgument(1) }
125+
override Expr getAccessedLength() { result = getArgument(0) }
126126
}
127127

128128
class NetworkFunctionCall extends FunctionCall {

0 commit comments

Comments
 (0)