Move the overflow check to alloc() so that the link struct overhead can
authormmcc <mmcc@openbsd.org>
Fri, 16 Oct 2015 23:13:35 +0000 (23:13 +0000)
committermmcc <mmcc@openbsd.org>
Fri, 16 Oct 2015 23:13:35 +0000 (23:13 +0000)
commita6a9e28a8a3e9da361bb3b2a76af547af5f63d3e
tree5d4a5eb737838d2bc33f44759993c8a4db5d6cdf
parentd9d98c6defca8868fea30d99b51d75f64edd0721
Move the overflow check to alloc() so that the link struct overhead can
never bite us.

Suggested by Theo Buehler, inspired by Bitrig's natano@.

ok tedu@
bin/ksh/alloc.c