File: E-array-bounds.description

package info (click to toggle)
bls-standalone 0.20151231
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 280 kB
  • sloc: ansic: 1,913; python: 236; makefile: 63
file content (18 lines) | stat: -rw-r--r-- 862 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## Match: regexp:[^:]*:[0-9]\+\(:[0-9]\+\)\?: warning:\/ array subscript is above array bounds
## Extract: simple 0 2 ':'
## Since: 6
The build log contains the term
<pre>
warning: array subscript is above array bounds
</pre>
<p>
This means the compiler thinks an array is accessed beyond its maximum length,
most likely meaning some buffer overflow.
</p>
<p>Also note that since C99, the old hack of having an array of length 1 was replaced
with another method and that accessing a fixed length array after its end is undefined
behaviour, so the compiler is free to assume it never happens when optimising.
(i.e. accessing any but the first element of an array of length 1 is an error and no false positive).
</p>
<p>In the unlikely case you find any false positives please let me know, so I can list here possible
cases or downgrade this tag to a warning.</p>