projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4159408
)
Fix size parameter of memcpy.
author
Ulrich Drepper
<drepper@redhat.com>
Mon, 8 May 2000 15:21:25 +0000
(15:21 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Mon, 8 May 2000 15:21:25 +0000
(15:21 +0000)
posix/execle.c
patch
|
blob
|
history
diff --git
a/posix/execle.c
b/posix/execle.c
index
a8a016e
..
546063f
100644
(file)
--- 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 *);