From e1ab1f8c3c4078347587c37f2a84e0e25ee0a703 Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 26 Dec 2010 13:41:53 +0000 Subject: sh: Fix integer overflow check, it checked an uninitialized variable. --- bin/sh/memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/sh') 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)); -- cgit v1.1