aboutsummaryrefslogtreecommitdiffstats
path: root/uid.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-03-26 21:25:51 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-03-26 21:25:51 +0000
commita0893a20e50af2deb56e6cfee0b455e310a5805a (patch)
tree5870c8ae4543913dc9cd5a461ec6433017f65140 /uid.c
parentf27916a7f27f00e1d2325538e55923c505706527 (diff)
downloadfetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.tar.gz
fetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.tar.bz2
fetchmail-a0893a20e50af2deb56e6cfee0b455e310a5805a.zip
Prevent pathological circular lists.
svn path=/trunk/; revision=1730
Diffstat (limited to 'uid.c')
-rw-r--r--uid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uid.c b/uid.c
index 8e51bb32..93fabcbd 100644
--- a/uid.c
+++ b/uid.c
@@ -277,7 +277,7 @@ int delete_str(struct idlist **idl, int num)
void append_str_list(struct idlist **idl, struct idlist **nidl)
/* append nidl to idl (does not copy *) */
{
- if ((*nidl) == (struct idlist *)NULL)
+ if ((*nidl) == (struct idlist *)NULL || *nidl == *idl)
return;
else if ((*idl) == (struct idlist *)NULL)
*idl = *nidl;