File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
cpp/ql/lib/semmle/code/cpp/commons Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments