diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-03-26 21:25:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-03-26 21:25:51 +0000 |
commit | a0893a20e50af2deb56e6cfee0b455e310a5805a (patch) | |
tree | 5870c8ae4543913dc9cd5a461ec6433017f65140 /rcfile_y.y | |
parent | f27916a7f27f00e1d2325538e55923c505706527 (diff) | |
download | fetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.tar.gz fetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.tar.bz2 fetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.zip |
Prevent pathological circular lists.
svn path=/trunk/; revision=1730
Diffstat (limited to 'rcfile_y.y')
-rw-r--r-- | rcfile_y.y | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -434,7 +434,8 @@ struct query *init; /* pointer to block containing initial values */ node = (struct query *) xmalloc(sizeof(struct query)); /* initialize it */ - memcpy(node, init, sizeof(struct query)); + if (init) + memcpy(node, init, sizeof(struct query)); /* append to end of list */ if (hosttail != (struct query *) 0) @@ -458,6 +459,11 @@ static void record_current(void) /* register current parameters and append to the host list */ { #define FLAG_FORCE(fld) if (cmd_opts.fld) current.fld = cmd_opts.fld + FLAG_FORCE(server.localdomains); + FLAG_FORCE(localnames); + FLAG_FORCE(mailboxes); + FLAG_FORCE(smtphunt); + FLAG_FORCE(server.via); FLAG_FORCE(server.protocol); #if INET6 @@ -484,10 +490,6 @@ static void record_current(void) FLAG_FORCE(remotename); FLAG_FORCE(password); - if (cmd_opts.mailboxes) - current.mailboxes = cmd_opts.mailboxes; - if (cmd_opts.smtphunt) - current.smtphunt = cmd_opts.smtphunt; FLAG_FORCE(mda); FLAG_FORCE(smtpaddress); FLAG_FORCE(antispam); |