From a6b586be3027c12b38c2bbda956770bba0f61bc4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 14 Jan 1997 08:04:51 +0000 Subject: Dynamic allocation for the query structure string entries. svn path=/trunk/; revision=757 --- options.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'options.c') 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; -- cgit v1.2.3