diff options
| author | Gregory Neil Shapiro <gshapiro@FreeBSD.org> | 2003-09-19 23:11:30 +0000 |
|---|---|---|
| committer | Gregory Neil Shapiro <gshapiro@FreeBSD.org> | 2003-09-19 23:11:30 +0000 |
| commit | 2baeb480ca7e9ef7a135c663faa77c95880915f3 (patch) | |
| tree | 7c19504cd6f9f226c7ed599b71ff34bbc38f82c8 /contrib/sendmail/src/recipient.c | |
| parent | 3e0cab95c0622b6792ca07844ef2e53af436797c (diff) | |
| parent | a7ec597c92be37562e4f76e105eeb7a3ba64d81a (diff) | |
Notes
Diffstat (limited to 'contrib/sendmail/src/recipient.c')
| -rw-r--r-- | contrib/sendmail/src/recipient.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/sendmail/src/recipient.c b/contrib/sendmail/src/recipient.c index 186c8b6ae34d..7452897a1cae 100644 --- a/contrib/sendmail/src/recipient.c +++ b/contrib/sendmail/src/recipient.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: recipient.c,v 8.330.2.1 2002/08/27 20:21:02 gshapiro Exp $") +SM_RCSID("@(#)$Id: recipient.c,v 8.330.2.2 2003/09/16 19:56:25 ca Exp $") static void includetimeout __P((void)); static ADDRESS *self_reference __P((ADDRESS *)); @@ -169,6 +169,7 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) SM_NONVOLATILE char delimiter; /* the address delimiter */ SM_NONVOLATILE int naddrs; SM_NONVOLATILE int i; + char *endp; char *oldto = e->e_to; char *SM_NONVOLATILE bufp; char buf[MAXNAME + 1]; @@ -206,6 +207,7 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) } else bufp = sm_malloc_x(i); + endp = bufp + i; SM_TRY { @@ -217,12 +219,16 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) auto char *delimptr; register ADDRESS *a; + SM_ASSERT(p < endp); + /* parse the address */ while ((isascii(*p) && isspace(*p)) || *p == ',') p++; + SM_ASSERT(p < endp); a = parseaddr(p, NULLADDR, RF_COPYALL, delimiter, &delimptr, e, true); p = delimptr; + SM_ASSERT(p < endp); if (a == NULL) continue; a->q_next = al; |
