You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Index '*index-name*' is out of valid index range '*minimum*' to '*maximum*' for possibly stack allocated buffer '*variable*'
12
12
13
-
This warning indicates that an integer offset into the specified stack array exceeds the maximum bounds of that array. It may potentially cause stack overflow errors, random behavior, or crashes.
13
+
This warning indicates that an integer offset into the specified stack array exceeds the maximum bounds of that array. It might potentially cause stack overflow errors, undefined behavior, or crashes.
14
14
15
15
## Remarks
16
16
@@ -45,3 +45,9 @@ void f()
45
45
}
46
46
}
47
47
```
48
+
49
+
## Heuristics
50
+
51
+
This analysis is limited to stack-allocated arrays. It doesn't consider, for example, arrays passed into the function with a SAL-annotated length.
52
+
53
+
This analysis can't catch all possible out of bounds indices because not all arithmetic can be precisely analyzed. It's tuned to report cases where it can guarantee an out of bounds index is possible. The absence of a warning doesn't mean the index is guaranteed to be in bounds.
0 commit comments