|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home Page bug415.cpp
This is a quick and dirty function (with the emphasis on dirty) to sort the global array[], but it keeps crashing. What is the programmer doing wrong?
bug415.cpp lint Output
--- Module: bug415.cpp
_
for( int i = 0; i < array[10]; i++ )
bug415.cpp(5) : Warning 415: access of out-of-bounds pointer (1
beyond end of data) by operator '['
bug415.cpp(5) : Warning 415: access of out-of-bounds pointer (1
beyond end of data) by operator '['
_
}
bug415.cpp(17) : Warning 415: access of out-of-bounds pointer (1
beyond end of data) by operator '['
Reference Manual Explanation
415 access of out-of-bounds pointer ('Integer' beyond end of data) by
operator 'String' -- An out-of-bounds pointer was accessed.
String designates the operator. The parameter 'Integer' gives
some idea how far out of bounds the pointer may be. It is
measured in units given by the size of the pointed to object.
The value is relative to the last item of good data and therefore
should always be greater than zero. For example:
int a[10];
a[10] = 0;
results in an overflow message containing the phrase '1 beyond
end of data'.
|
Previous Bug - Bug #1733 - September 2000