We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4bca951 + 56dc2a4 commit ba982e2Copy full SHA for ba982e2
cpp/ql/lib/semmle/code/cpp/security/BufferAccess.qll
@@ -314,9 +314,8 @@ class FreadBA extends BufferAccess {
314
* but not:
315
* &buffer[ix]
316
*/
317
-class ArrayExprBA extends BufferAccess {
+class ArrayExprBA extends BufferAccess, ArrayExpr {
318
ArrayExprBA() {
319
- exists(this.(ArrayExpr).getArrayOffset().getValue().toInt()) and
320
not exists(AddressOfExpr aoe | aoe.getAChild() = this) and
321
// exclude accesses in macro implementation of `strcmp`,
322
// which are carefully controlled but can look dangerous.
0 commit comments