diff options
author | jilles <jilles@FreeBSD.org> | 2010-12-26 13:41:53 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-12-26 13:41:53 +0000 |
commit | e1ab1f8c3c4078347587c37f2a84e0e25ee0a703 (patch) | |
tree | 64b74790b4c1d2a8b616565841406d28c4528ea6 /bin/sh | |
parent | de73f385a5709ba788137d94801ead1014f1c5f0 (diff) | |
download | FreeBSD-src-e1ab1f8c3c4078347587c37f2a84e0e25ee0a703.zip FreeBSD-src-e1ab1f8c3c4078347587c37f2a84e0e25ee0a703.tar.gz |
sh: Fix integer overflow check, it checked an uninitialized variable.
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/memalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c index 0567009..2571a7e 100644 --- a/bin/sh/memalloc.c +++ b/bin/sh/memalloc.c @@ -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)); |