From c77d56884d51e2aae2036cabb58836bfa54eeb66 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 19 Oct 2003 22:50:36 +0000 Subject: check alloca; pointed out by nimadeus@pandora.be --- usr.bin/nc/netcat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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 * @@ -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; -- cgit v1.2.3