ARGC ON STACK FIX
authorJulian Elischer <julian@dialix.oz.au>
Sat, 12 Dec 1992 00:00:00 +0000 (00:00 +0000)
committerJulian Elischer <julian@dialix.oz.au>
Sat, 12 Dec 1992 00:00:00 +0000 (00:00 +0000)
In placing the argc into the user's addres space, we cannot just
use normal addressing, but rather, must use suword, (a form of copyout()
).

AUTHOR: Julian Elischer (julian@ref.tfs.com)
386BSD-Patchkit: patch00069

usr/src/sys.386bsd/kern/kern_execve.c

index 41cf010..abbc419 100644 (file)
  *
  * PATCHES MAGIC                LEVEL   PATCH THAT GOT US HERE
  * --------------------         -----   ----------------------
  *
  * PATCHES MAGIC                LEVEL   PATCH THAT GOT US HERE
  * --------------------         -----   ----------------------
- * CURRENT PATCH LEVEL:         2       00025
+ * CURRENT PATCH LEVEL:         3       00069
  * --------------------         -----   ----------------------
  *
  * 05 Aug 92   Paul Kranenburg         Fixed #! as a magic number
  * 29 Jul 92   Mark Tinguely           Fixed execute permission enforcement
  * 15 Aug 92    Terry Lambert           Fixed CMOS RAM size bug
  * --------------------         -----   ----------------------
  *
  * 05 Aug 92   Paul Kranenburg         Fixed #! as a magic number
  * 29 Jul 92   Mark Tinguely           Fixed execute permission enforcement
  * 15 Aug 92    Terry Lambert           Fixed CMOS RAM size bug
+ * 12 Dec 92   Julians Elischer        Place argc into user address space
+ *                                     correctly
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -364,7 +366,8 @@ dont_bother:
         */
 
        /* stuff arg count on top of "new" stack */
         */
 
        /* stuff arg count on top of "new" stack */
-       argbuf[-1] = (char *)argc;
+       /* argbuf[-1] = (char *)argc;*/
+       suword(argbuf-1,argc);
 
        /*
         * Step 4. Build the new processes image.
 
        /*
         * Step 4. Build the new processes image.