Deleted Added
full compact
parseaddr.c (141858) parseaddr.c (147078)
1/*
1/*
2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
2 * Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
16SM_RCSID("@(#)$Id: parseaddr.c,v 8.379 2004/08/06 22:19:36 ca Exp $")
16SM_RCSID("@(#)$Id: parseaddr.c,v 8.381 2005/02/04 22:01:45 ca Exp $")
17
18static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *));
19static int callsubr __P((char**, int, ENVELOPE *));
20static char *map_lookup __P((STAB *, char *, char **, int *, ENVELOPE *));
21static ADDRESS *buildaddr __P((char **, ADDRESS *, int, ENVELOPE *));
22static bool hasctrlchar __P((register char *, bool, bool));
23
24/* replacement for illegal characters in addresses */

--- 2164 unchanged lines hidden (view full) ---

2189 if (sz <= 0)
2190 break;
2191 oatomtok = natomtok;
2192 p += i;
2193 if (pvp++ == evp)
2194 break;
2195 }
2196
17
18static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *));
19static int callsubr __P((char**, int, ENVELOPE *));
20static char *map_lookup __P((STAB *, char *, char **, int *, ENVELOPE *));
21static ADDRESS *buildaddr __P((char **, ADDRESS *, int, ENVELOPE *));
22static bool hasctrlchar __P((register char *, bool, bool));
23
24/* replacement for illegal characters in addresses */

--- 2164 unchanged lines hidden (view full) ---

2189 if (sz <= 0)
2190 break;
2191 oatomtok = natomtok;
2192 p += i;
2193 if (pvp++ == evp)
2194 break;
2195 }
2196
2197 /* Don't silently truncate long strings */
2197#if 0
2198 /*
2199 ** Silently truncate long strings: even though this doesn't
2200 ** seem like a good idea it is necessary because header checks
2201 ** send the whole header value to rscheck() and hence rewrite().
2202 ** The latter however sometimes uses a "short" buffer (e.g.,
2203 ** cbuf[MAXNAME + 1]) to call cataddr() which then triggers this
2204 ** error function. One possible fix to the problem is to pass
2205 ** flags to rscheck() and rewrite() to distinguish the various
2206 ** calls and only trigger the error if necessary. For now just
2207 ** undo the change from 8.13.0.
2208 */
2209
2198 if (sz <= 0)
2199 usrerr("cataddr: string too long");
2210 if (sz <= 0)
2211 usrerr("cataddr: string too long");
2212#endif
2200 *p = '\0';
2201}
2202/*
2203** SAMEADDR -- Determine if two addresses are the same
2204**
2205** This is not just a straight comparison -- if the mailer doesn't
2206** care about the host we just ignore it, etc.
2207**

--- 1015 unchanged lines hidden ---
2213 *p = '\0';
2214}
2215/*
2216** SAMEADDR -- Determine if two addresses are the same
2217**
2218** This is not just a straight comparison -- if the mailer doesn't
2219** care about the host we just ignore it, etc.
2220**

--- 1015 unchanged lines hidden ---