diff options
author | 1998-03-15 22:19:24 +0000 | |
---|---|---|
committer | 1998-03-15 22:19:24 +0000 | |
commit | f28f52ecd205509aecf695b6dcf94daaa7e4ada2 (patch) | |
tree | 1cfebf77f9430325c4e164bd45f9f8340fa90ba8 | |
parent | document FFS_SOFTUPDATES option and how to enable it. Also include (diff) | |
download | wireguard-openbsd-f28f52ecd205509aecf695b6dcf94daaa7e4ada2.tar.xz wireguard-openbsd-f28f52ecd205509aecf695b6dcf94daaa7e4ada2.zip |
fix possibility of null pointer deref when using make's "-j" option.
-rw-r--r-- | usr.bin/make/job.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index a5a04c3f85a..3b250fdce4c 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.8 1997/12/16 22:26:21 deraadt Exp $ */ +/* $OpenBSD: job.c,v 1.9 1998/03/15 22:19:24 flipk Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: job.c,v 1.8 1997/12/16 22:26:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: job.c,v 1.9 1998/03/15 22:19:24 flipk Exp $"; #endif #endif /* not lint */ @@ -1298,7 +1298,7 @@ JobExec(job, argv) int bytes = howmany(job->inPipe+1, NFDBITS) * sizeof(fd_mask); int obytes = howmany(outputsn+1, NFDBITS) * sizeof(fd_mask); - if (obytes != bytes) { + if (outputsp == NULL || obytes != bytes) { outputsp = realloc(outputsp, bytes); if (outputsp == NULL) return; |