diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-10-20 04:33:28 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-10-20 04:33:28 +0000 |
commit | 42eddaeaf36d467074f329599193030c3beba8ba (patch) | |
tree | 3f271d26a6eb861fefd0a384f3e11b8e965833aa /options.c | |
parent | 3299270c28441b9d01a24da727eeaa6553c4d7aa (diff) | |
download | fetchmail-42eddaeaf36d467074f329599193030c3beba8ba.tar.gz fetchmail-42eddaeaf36d467074f329599193030c3beba8ba.tar.bz2 fetchmail-42eddaeaf36d467074f329599193030c3beba8ba.zip |
Make alloca safe.
svn path=/trunk/; revision=2115
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -7,13 +7,6 @@ #include "config.h" #include <stdio.h> -#if defined(HAVE_ALLOCA_H) -#include <alloca.h> -#else -#ifdef _AIX - #pragma alloca -#endif -#endif #include <pwd.h> #include <string.h> #include <errno.h> @@ -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 { |