Bash-4.2 patch 33
This commit is contained in:
parent
a601c74902
commit
14459df34a
2 changed files with 4 additions and 2 deletions
|
|
@ -82,6 +82,8 @@ sh_stat (path, finfo)
|
|||
const char *path;
|
||||
struct stat *finfo;
|
||||
{
|
||||
static char *pbuf = 0;
|
||||
|
||||
if (*path == '\0')
|
||||
{
|
||||
errno = ENOENT;
|
||||
|
|
@ -106,7 +108,7 @@ sh_stat (path, finfo)
|
|||
trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx.
|
||||
On most systems, with the notable exception of linux, this is
|
||||
effectively a no-op. */
|
||||
char pbuf[32];
|
||||
pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
|
||||
strcpy (pbuf, DEV_FD_PREFIX);
|
||||
strcat (pbuf, path + 8);
|
||||
return (stat (pbuf, finfo));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue