From d3b9fc42cadf308da7fab21c338cca55aa778ae7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 20 Oct 2015 16:34:01 -0400 Subject: app-shells/bash: backport /dev/fd fix to older versions #431850 --- .../bash/files/bash-3.1-dev-fd-buffer-overflow.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch (limited to 'app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch') diff --git a/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch new file mode 100644 index 00000000000..9d08856e5b0 --- /dev/null +++ b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch @@ -0,0 +1,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)); -- cgit v1.2.1