We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bd4cce commit 91752e5Copy full SHA for 91752e5
1 file changed
cpp/ql/lib/semmle/code/cpp/commons/Buffer.qll
@@ -62,11 +62,13 @@ private Class getRootType(FieldAccess fa) {
62
* unspecified type of `v` is a `ReferenceType`.
63
*/
64
private int getVariableSize(Variable v) {
65
- exists(Type t |
66
- t = v.getUnspecifiedType() and
67
- not t instanceof ReferenceType and
68
- result = t.getSize()
69
- )
+ result =
+ unique(Type t |
+ t = v.getUnspecifiedType() and
+ not t instanceof ReferenceType
+ |
70
+ t.getSize()
71
+ )
72
}
73
74
/**
0 commit comments