Skip to content

Commit 0cd859c

Browse files
committed
C++: qlformat
1 parent 063bff0 commit 0cd859c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ where
2828
// If we see an addWithSizeof then we expect the type of
2929
// the pointer expression to be `char*` or `void*`. Otherwise it
3030
// is probably a mistake.
31-
addWithSizeof(e, sizeofExpr, _) and not isCharSzPtrExpr(e)
31+
addWithSizeof(e, sizeofExpr, _) and
32+
not isCharSzPtrExpr(e)
3233
select sizeofExpr,
3334
"Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@.",
3435
e.getFullyConverted().getType() as t, t.toString()

0 commit comments

Comments
 (0)