execle
Andreas Schwab
schwab@suse.de
Mon May 8 06:33:00 GMT 2000
This fixes a bug in execle.
Andreas.
2000-05-08 Andreas Schwab <schwab@suse.de>
* posix/execle.c: Fix size parameter of memcpy.
Index: posix/execle.c
===================================================================
RCS file: /cvs/glibc/libc/posix/execle.c,v
retrieving revision 1.6
diff -u -a -u -r1.6 posix/execle.c
--- posix/execle.c 1999/04/28 22:14:28 1.6
+++ posix/execle.c 2000/05/08 13:32:22
@@ -48,7 +48,8 @@
if ((char *) nptr + argv_max == (char *) argv)
{
/* Stack grows down. */
- argv = (const char **) memcpy (nptr, argv, i);
+ argv = (const char **) memcpy (nptr, argv,
+ i * sizeof (const char *));
argv_max += i;
}
else
@@ -60,7 +61,8 @@
else
#endif
/* We have a hole in the stack. */
- argv = (const char **) memcpy (nptr, argv, i);
+ argv = (const char **) memcpy (nptr, argv,
+ i * sizeof (const char *));
}
argv[i] = va_arg (args, const char *);
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
More information about the Libc-hacker
mailing list