mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-05 09:01:07 +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)
|
if ((char *) nptr + argv_max == (char *) argv)
|
||||||
{
|
{
|
||||||
/* Stack grows down. */
|
/* Stack grows down. */
|
||||||
argv = (const char **) memcpy (nptr, argv, i);
|
argv = (const char **) memcpy (nptr, argv,
|
||||||
|
i * sizeof (const char *));
|
||||||
argv_max += i;
|
argv_max += i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -60,7 +61,8 @@ execle (const char *path, const char *arg, ...)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
/* We have a hole in the stack. */
|
/* 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 *);
|
argv[i] = va_arg (args, const char *);
|
||||||
|
Loading…
Reference in New Issue
Block a user