don't dereference null pointer; from Gentoo via Robert Nagy <thuglife@bsd.hu>
This commit is contained in:
parent
be04f5a49d
commit
789ddb290e
12
shells/bash2/patches/patch-redir_c
Normal file
12
shells/bash2/patches/patch-redir_c
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user