Author: jilles
Date: Sun Dec 26 13:41:53 2010
New Revision: 216707
URL: http://svn.freebsd.org/changeset/base/216707
Log:
  sh: Fix integer overflow check, it checked an uninitialized variable.

Modified:
  head/bin/sh/memalloc.c

Modified: head/bin/sh/memalloc.c
==============================================================================
--- head/bin/sh/memalloc.c      Sun Dec 26 13:25:47 2010        (r216706)
+++ head/bin/sh/memalloc.c      Sun Dec 26 13:41:53 2010        (r216707)
@@ -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));
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to