An SBW message indicates that your program is about to write across stack frame boundaries. This is similar to an ABW, but concerns a local variable instead of a malloc'd block.
An SBW error can be caused by any of the following:
Making an automatic array too small, for example failing to account for the terminating NULL in a string
Forgetting to multiply by sizeof(type) when allocating for an array of objects
Using an array index that is too large or negative
Failing to NULL terminate a string
Being off by one in copying elements up or down an array
Notes:
If the 'off-by-one' write in the example does not cause an SBW message on your system, your compiler may be padding the local variables, or it may be allocating them in a different order than the example presumes.
On SPARC systems, Purify also detects access across stack frames.
Purify does not support SBR messages on HP-UX or IRIX.