diff --git a/shells/bash2/patches/patch-redir_c b/shells/bash2/patches/patch-redir_c new file mode 100644 index 00000000000..95dca9a650d --- /dev/null +++ b/shells/bash2/patches/patch-redir_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-redir_c,v 1.1 2004/04/08 00:13:43 naddy Exp $ +--- redir.c.orig 2004-04-08 02:04:50.000000000 +0200 ++++ redir.c 2004-04-08 02:05:09.000000000 +0200 +@@ -263,7 +263,7 @@ write_here_string (fd, redirectee) + int herelen, n, e; + + herestr = expand_string_to_string (redirectee->word, 0); +- herelen = strlen (herestr); ++ herelen = (herestr == NULL) ? 0 : strlen (herestr); + + n = write (fd, herestr, herelen); + if (n == herelen)