Module Name: src Committed By: maxv Date: Wed Apr 9 11:40:03 UTC 2014
Modified Files: src/sys/compat/svr4_32: svr4_32_exec_elf32.c Log Message: 'error' is not set on failure. Which means that if copyout() fails, 0 will be returned while the stack is not ready. This is a bug. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/compat/svr4_32/svr4_32_exec_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/svr4_32/svr4_32_exec_elf32.c diff -u src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.22 src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23 --- src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.22 Fri Feb 3 20:11:54 2012 +++ src/sys/compat/svr4_32/svr4_32_exec_elf32.c Wed Apr 9 11:40:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_exec_elf32.c,v 1.22 2012/02/03 20:11:54 matt Exp $ */ +/* $NetBSD: svr4_32_exec_elf32.c,v 1.23 2014/04/09 11:40:03 maxv Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.22 2012/02/03 20:11:54 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.23 2014/04/09 11:40:03 maxv Exp $"); #define ELFSIZE 32 /* XXX should die */ @@ -244,7 +244,7 @@ svr4_32_copyargs(struct lwp *l, struct e a++; len = (a - ai) * sizeof(AuxInfo); - if (copyout(ai, *stackp, len)) + if ((error = copyout(ai, *stackp, len)) != 0) return error; *stackp += len;