From: Ulrich Drepper Date: Mon, 8 May 2000 15:21:25 +0000 (+0000) Subject: Fix size parameter of memcpy. X-Git-Tag: cvs/glibc_2-1-91~438 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e3d1368f8259fb90a350932ce552d83a77d2e60;p=platform%2Fupstream%2Fglibc.git Fix size parameter of memcpy. --- diff --git a/posix/execle.c b/posix/execle.c index a8a016e..546063f 100644 --- a/posix/execle.c +++ b/posix/execle.c @@ -48,7 +48,8 @@ execle (const char *path, const char *arg, ...) 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 @@ execle (const char *path, const char *arg, ...) 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 *);