summaryrefslogtreecommitdiff
blob: 9d08856e5b00daf707716b97abe4cd965ea53bcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
https://bugs.gentoo.org/431850

this is a backport of the upstream bash42-033 patch for bash 3.1/3.0/2.05

--- a/test.c
+++ b/test.c
@@ -194,7 +194,8 @@
      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];
+      static char *pbuf = 0;
+      pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
       strcpy (pbuf, DEV_FD_PREFIX);
       strcat (pbuf, path + 8);
       return (stat (pbuf, finfo));