mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
Fix size parameter of memcpy.
This commit is contained in:
parent
4159408a7f
commit
6e3d1368f8
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user