sh: Fix integer overflow check, it checked an uninitialized variable.

This commit is contained in:
Jilles Tjoelker 2010-12-26 13:41:53 +00:00
parent d8f32e7287
commit 78962f36d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216707

View File

@ -231,7 +231,7 @@ growstackblock(int min)
if (min < stacknleft)
min = stacknleft;
if (newlen >= INT_MAX / 2 - ALIGN(sizeof(struct stack_block)))
if (min >= INT_MAX / 2 - ALIGN(sizeof(struct stack_block)))
error("Out of space");
min += stacknleft;
min += ALIGN(sizeof(struct stack_block));