aboutsummaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-14 08:04:51 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-14 08:04:51 +0000
commita6b586be3027c12b38c2bbda956770bba0f61bc4 (patch)
treef37a3f86b1de5ed1e030731f159605431372f0ad /options.c
parentbe9c9f0a5b6d598fb9eeb8e4d2d2cfef367dd759 (diff)
downloadfetchmail-a6b586be3027c12b38c2bbda956770bba0f61bc4.tar.gz
fetchmail-a6b586be3027c12b38c2bbda956770bba0f61bc4.tar.bz2
fetchmail-a6b586be3027c12b38c2bbda956770bba0f61bc4.zip
Dynamic allocation for the query structure string entries.
svn path=/trunk/; revision=757
Diffstat (limited to 'options.c')
-rw-r--r--options.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/options.c b/options.c
index b474666d..5bf97888 100644
--- a/options.c
+++ b/options.c
@@ -216,7 +216,7 @@ struct query *ctl; /* option record to be initialized */
case 'u':
case LA_USERNAME:
- strncpy(ctl->remotename,optarg,sizeof(ctl->remotename)-1);
+ ctl->remotename = xstrdup(optarg);
break;
case 'a':
case LA_ALL:
@@ -244,11 +244,11 @@ struct query *ctl; /* option record to be initialized */
break;
case 'r':
case LA_REMOTEFILE:
- strncpy(ctl->mailbox,optarg,sizeof(ctl->mailbox)-1);
+ ctl->mailbox = xstrdup(optarg);
break;
case 'S':
case LA_SMTPHOST:
- strncpy(ctl->smtphost,optarg,sizeof(ctl->smtphost)-1);
+ ctl->smtphost = xstrdup(optarg);
ocount++;
break;
case 'b':
@@ -261,7 +261,7 @@ struct query *ctl; /* option record to be initialized */
break;
case 'm':
case LA_MDA:
- strncpy(ctl->mda,optarg,sizeof(ctl->mda));
+ ctl->mda = xstrdup(optarg);
ocount++;
break;