Skip to content

Commit aed0e68

Browse files
committed
C++: Remove uniqueness since it is enforced earlier now.
1 parent 13a5249 commit aed0e68

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,8 @@ private int isSource(Expr bufferExpr, Element why) {
120120
exists(Variable bufferVar | bufferVar = bufferExpr.(VariableAccess).getTarget() |
121121
// buffer is a fixed size array
122122
exists(bufferVar.getUnspecifiedType().(ArrayType).getSize()) and
123-
result =
124-
unique(int size | // more generous than .getSize() itself, when the array is a class field or similar.
125-
size = getSize(bufferExpr)
126-
|
127-
size
128-
) and
123+
// more generous than .getSize() itself, when the array is a class field or similar.
124+
result = getSize(bufferExpr) and
129125
why = bufferVar and
130126
not memberMayBeVarSize(_, bufferVar) and
131127
not exists(BuiltInOperationBuiltInOffsetOf offsetof | offsetof.getAChild*() = bufferExpr) and

0 commit comments

Comments
 (0)