This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |