mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-05 09:01:07 +00:00
* posix/execl.c: Fix last argument of memcpy. Reported by Brian
Sumner <bls@sgi.com>. * posix/execlp.c: Likewise.
This commit is contained in:
parent
23382b36a7
commit
0f5660af02
@ -52,7 +52,8 @@ execl (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
|
||||||
@ -64,7 +65,8 @@ execl (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 *);
|
||||||
|
@ -49,7 +49,8 @@ execlp (const char *file, 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
|
||||||
@ -61,7 +62,8 @@ execlp (const char *file, 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