Make 112_backtrace/bcheck_123 more robust
commita5f6e6189e75e2f2cdb85b24b51079884393c04c
authorMichael Matz <matz@suse.de>
Sat, 18 Jan 2020 02:06:44 +0000 (18 03:06 +0100)
committerMichael Matz <matz@suse.de>
Sat, 18 Jan 2020 02:06:44 +0000 (18 03:06 +0100)
treed167e918a37f9364bd94c99548de1d048d28a867
parent2b7cffac7483f54b83b06f6574e728613a5d55d5
Make 112_backtrace/bcheck_123 more robust

the strcat checker first checks dest for overlap, then src.
If the padding byte between b[] and the pad[] arrays happens to be zero
the dest check would have succeeded and the src test failed.  If that
padding byte would be zero the dest check would trigger first.
As we can't influence the padding byte (only the b[] and pad[] arrays)
it was random if the dest or src checks triggered.

This makes it reliably trigger the dest check first.
tests/tests2/112_backtrace.c
tests/tests2/112_backtrace.expect