Skip to content

Commit f406729

Browse files
committed
Add an additional check to INT36-C
Additional clause to ensure `int` has different size from `PointerType` to avoid FP on some platforms
1 parent c2ced98 commit f406729

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c/cert/src/rules/INT36-C/ConvertingAPointerToIntegerOrIntegerToPointer.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,6 @@ where
9595
assigningPointerValueToInteger(elem, message)
9696
or
9797
castingPointerToInteger(elem, message)
98-
)
98+
) and
99+
forall(IntType intType, PointerType ptrType | intType.getSize() != ptrType.getSize())
99100
select elem, message

0 commit comments

Comments
 (0)