diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2004-06-20 22:37:22 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2004-06-20 22:37:22 +0000 |
commit | edd5ce97c3f39f3855e9b829df59500667c4682d (patch) | |
tree | 0bece303627fee1b8d9705fedb6cfa2fb6c6a411 /shells | |
parent | - Update to 0.7.13 (diff) |
Avoid a null pointer dereference, so 'xargs <<< ${EMTPY_VARIABLE}'
will not segfault and dump core.
Submitted by: Robert Nagy <robert@openbsd.org>
Notes
Notes:
svn path=/head/; revision=111891
Diffstat (limited to 'shells')
-rw-r--r-- | shells/bash/Makefile | 2 | ||||
-rw-r--r-- | shells/bash/files/patch-redir.c | 20 | ||||
-rw-r--r-- | shells/bash2/Makefile | 2 | ||||
-rw-r--r-- | shells/bash2/files/patch-redir.c | 20 | ||||
-rw-r--r-- | shells/bash3/Makefile | 2 | ||||
-rw-r--r-- | shells/bash3/files/patch-redir.c | 20 |
6 files changed, 63 insertions, 3 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index b3066ea38177..e4a986b630ef 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -8,7 +8,7 @@ PORTNAME= bash PORTVERSION= 2.05b.007 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash/files/patch-redir.c b/shells/bash/files/patch-redir.c new file mode 100644 index 000000000000..ea8c49cb57a0 --- /dev/null +++ b/shells/bash/files/patch-redir.c @@ -0,0 +1,20 @@ +Index: files/patch-redir.c +=================================================================== +RCS file: files/patch-redir.c +diff -N files/patch-redir.c +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ files/patch-redir.c 20 Jun 2004 15:40:43 -0000 +@@ -0,0 +1,11 @@ ++--- redir.c.orig Sun Jun 20 18:00:47 2004 +++++ redir.c Sun Jun 20 18:01:25 2004 ++@@ -263,7 +263,7 @@ ++ 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) + + diff --git a/shells/bash2/Makefile b/shells/bash2/Makefile index b3066ea38177..e4a986b630ef 100644 --- a/shells/bash2/Makefile +++ b/shells/bash2/Makefile @@ -8,7 +8,7 @@ PORTNAME= bash PORTVERSION= 2.05b.007 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash2/files/patch-redir.c b/shells/bash2/files/patch-redir.c new file mode 100644 index 000000000000..ea8c49cb57a0 --- /dev/null +++ b/shells/bash2/files/patch-redir.c @@ -0,0 +1,20 @@ +Index: files/patch-redir.c +=================================================================== +RCS file: files/patch-redir.c +diff -N files/patch-redir.c +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ files/patch-redir.c 20 Jun 2004 15:40:43 -0000 +@@ -0,0 +1,11 @@ ++--- redir.c.orig Sun Jun 20 18:00:47 2004 +++++ redir.c Sun Jun 20 18:01:25 2004 ++@@ -263,7 +263,7 @@ ++ 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) + + diff --git a/shells/bash3/Makefile b/shells/bash3/Makefile index b3066ea38177..e4a986b630ef 100644 --- a/shells/bash3/Makefile +++ b/shells/bash3/Makefile @@ -8,7 +8,7 @@ PORTNAME= bash PORTVERSION= 2.05b.007 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ diff --git a/shells/bash3/files/patch-redir.c b/shells/bash3/files/patch-redir.c new file mode 100644 index 000000000000..ea8c49cb57a0 --- /dev/null +++ b/shells/bash3/files/patch-redir.c @@ -0,0 +1,20 @@ +Index: files/patch-redir.c +=================================================================== +RCS file: files/patch-redir.c +diff -N files/patch-redir.c +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ files/patch-redir.c 20 Jun 2004 15:40:43 -0000 +@@ -0,0 +1,11 @@ ++--- redir.c.orig Sun Jun 20 18:00:47 2004 +++++ redir.c Sun Jun 20 18:01:25 2004 ++@@ -263,7 +263,7 @@ ++ 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) + + |