In this section:
This error is generated whenever a block of memory indicated by a pointer will be written outside its valid range.
Code Description Enabled Reported Platform WRITE_OVERFLOW Runtime Windows/Unix (normal) Writing overflows memory Runtime Windows/Unix (struct) Structure references out of range Runtime Windows/Unix
This code attempts to copy a string into the array
a, which is not large enough.
Another problem includes
writovr2.c. A diagnosis similar to the one that follows applies.
Diagnosis at Runtime
- Line 2: Source line at which the problem was detected.
- Line 3: Description of the problem and the incorrect expression.
- Line 4: Schematic showing the relative layout of the actual memory block (b) and region being written (w). See Overflow Diagrams.
- Line 7: Range of memory being written and description of the block to which the write is taking place, including its size and the location of its declaration.
- Line 10: Stack trace showing the call sequence leading to the error.
This error often occurs when working with strings. In most cases, a simple fix is to increase the size of the destination object.