summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-19 22:50:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-19 22:50:36 +0000
commitc77d56884d51e2aae2036cabb58836bfa54eeb66 (patch)
tree55552fd9793b7e98d723066adc4d12a1f5719dc2 /usr.bin
parentdb28996a9a376dad8a599013e115ac6cf3b3e973 (diff)
check alloca; pointed out by nimadeus@pandora.be
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nc/netcat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index edf26866073..df5c44a8ce5 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.63 2003/09/22 21:39:40 miod Exp $ */
+/* $OpenBSD: netcat.c,v 1.64 2003/10/19 22:50:35 deraadt Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -172,7 +172,8 @@ main(int argc, char *argv[])
break;
case 'x':
xflag = 1;
- proxy = strdup(optarg);
+ if ((proxy = strdup(optarg)) == NULL)
+ err(1, NULL);
break;
case 'z':
zflag = 1;