if strlen(s) was 0, it would then end up using s[-1] as an array index. Bad,
authorEric Andersen <andersen@codepoet.org>
Tue, 3 Apr 2001 22:50:52 +0000 (22:50 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 3 Apr 2001 22:50:52 +0000 (22:50 -0000)
commit60b2d8d2c8bf9e1bb3f34a3b16b272c2539a6318
tree28a3e4396e8b8c69b51c793fb16198002272f894
parentc97ec34370f66771713809ab7da19b7fe923cffe
if strlen(s) was 0, it would then end up using s[-1] as an array index.  Bad,
bad, bad.  This was crashing the shell on powerpc boxes, though all other archs
seem to have a much more forgiving malloc implementations.  I finally found
this bug using electric-fence on a powerpc box.
 -Erik
libbb/trim.c