diff options
Diffstat (limited to 'contrib/sendmail/src/map.c')
-rw-r--r-- | contrib/sendmail/src/map.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/sendmail/src/map.c b/contrib/sendmail/src/map.c index 6f9a461..8362327 100644 --- a/contrib/sendmail/src/map.c +++ b/contrib/sendmail/src/map.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1992, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1992, 1993 @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: map.c,v 8.645.2.7 2002/12/03 17:01:15 ca Exp $") +SM_RCSID("@(#)$Id: map.c,v 8.645.2.10 2003/07/24 18:24:17 ca Exp $") #if LDAPMAP # include <sm/ldap.h> @@ -383,7 +383,7 @@ map_rewrite(map, s, slen, av) if (c != '%') { pushc: - if (--len <= 0) + if (len-- <= 1) break; *bp++ = c; continue; @@ -394,8 +394,9 @@ map_rewrite(map, s, slen, av) goto pushc; if (!(isascii(c) && isdigit(c))) { + if (len-- <= 1) + break; *bp++ = '%'; - --len; goto pushc; } for (avp = av; --c >= '0' && *avp != NULL; avp++) @@ -1173,8 +1174,7 @@ dns_map_lookup(map, name, av, statp) if (r == NULL) { result = NULL; - if (errno == ETIMEDOUT || h_errno == TRY_AGAIN || - errno == ECONNREFUSED) + if (h_errno == TRY_AGAIN || transienterror(errno)) *statp = EX_TEMPFAIL; else *statp = EX_NOTFOUND; @@ -6944,6 +6944,10 @@ regex_map_init(map, ap) map->map_mflags |= MF_MATCHONLY; break; + case 'q': + map->map_mflags |= MF_KEEPQUOTES; + break; + case 'S': map->map_spacesub = *++p; break; |