From 42eddaeaf36d467074f329599193030c3beba8ba Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 20 Oct 1998 04:33:28 +0000 Subject: Make alloca safe. svn path=/trunk/; revision=2115 --- options.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 4ac3813c..da8df81c 100644 --- a/options.c +++ b/options.c @@ -7,13 +7,6 @@ #include "config.h" #include -#if defined(HAVE_ALLOCA_H) -#include -#else -#ifdef _AIX - #pragma alloca -#endif -#endif #include #include #include @@ -418,7 +411,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'r': case LA_FOLDER: - buf = alloca(strlen(optarg)); + xalloca(buf, char *, strlen(optarg)); strcpy(buf, optarg); cp = strtok(buf, ","); do { @@ -428,7 +421,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'S': case LA_SMTPHOST: - buf = alloca(strlen(optarg)); + xalloca(buf, char *, strlen(optarg)); strcpy(buf, optarg); cp = strtok(buf, ","); do { @@ -443,7 +436,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'Z': case LA_ANTISPAM: - buf = alloca(strlen(optarg)); + xalloca(buf, char *, strlen(optarg)); strcpy(buf, optarg); cp = strtok(buf, ","); do { -- cgit v1.2.3