Fixed a segfault when tossing as a point echomail without a seen-by line

This commit is contained in:
Michiel Broek 2005-11-01 14:59:29 +00:00
parent 8050729f4d
commit 79f51e8042
2 changed files with 11 additions and 1 deletions

View File

@ -3,6 +3,11 @@ $Id$
v0.81.5 25-Oct-2005
mbfido:
Fixed a segfault when tossing as a point echomail without a
seen-by line.
v0.81.4 23-Oct-2005 - 25-Oct-2005
libmbse.a:

View File

@ -434,7 +434,12 @@ int postecho(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj, time_t m
/*
* Ensure that it will not match for the first entry.
*/
oldnet = sbl->addr->net - 1;
if ((sbl) && (sbl->addr) && (sbl->addr->net))
oldnet = sbl->addr->net - 1;
else {
Syslog('m', "Empty seen-by list in %s", msgs.Tag);
oldnet = -1;
}
for (tmpl = sbl; tmpl; tmpl = tmpl->next) {
if (tmpl->addr->net == oldnet)
snprintf(sbe, 16, " %u", tmpl->addr->node);