diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-14 08:04:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-14 08:04:51 +0000 |
commit | a6b586be3027c12b38c2bbda956770bba0f61bc4 (patch) | |
tree | f37a3f86b1de5ed1e030731f159605431372f0ad /options.c | |
parent | be9c9f0a5b6d598fb9eeb8e4d2d2cfef367dd759 (diff) | |
download | fetchmail-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |