Skip to content

Commit 9105375

Browse files
committed
Addreessing false positive due to incorrect use of getType
1 parent cd8a5d7 commit 9105375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/commons/Buffer.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private int isSource(Expr bufferExpr, Element why) {
5757
exists(Type bufferType |
5858
// buffer is the address of a variable
5959
why = bufferExpr.(AddressOfExpr).getAddressable() and
60-
bufferType = why.(Variable).getType() and
60+
bufferType = why.(Variable).getUnspecifiedType() and
6161
result = bufferType.getSize() and
6262
not bufferType instanceof ReferenceType and
6363
not any(Union u).getAMemberVariable() = why

0 commit comments

Comments
 (0)