aboutsummaryrefslogtreecommitdiff
path: root/posix/execle.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-08 15:21:25 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-08 15:21:25 +0000
commit6e3d1368f8259fb90a350932ce552d83a77d2e60 (patch)
tree781f74624e54c7b21b7e2fd10af00f6e9eb33163 /posix/execle.c
parent4159408a7fcb6a8f14e395f0f49cc87ec2a296be (diff)
downloadglibc-6e3d1368f8259fb90a350932ce552d83a77d2e60.tar
glibc-6e3d1368f8259fb90a350932ce552d83a77d2e60.tar.gz
glibc-6e3d1368f8259fb90a350932ce552d83a77d2e60.tar.bz2
glibc-6e3d1368f8259fb90a350932ce552d83a77d2e60.zip
Fix size parameter of memcpy.
Diffstat (limited to 'posix/execle.c')
-rw-r--r--posix/execle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/posix/execle.c b/posix/execle.c
index a8a016ee69..546063fcc7 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 *);