Deleted Added
full compact
12c12
< * $FreeBSD: head/contrib/sendmail/src/savemail.c 159613 2006-06-14 16:25:31Z gshapiro $
---
> * $FreeBSD: head/contrib/sendmail/src/savemail.c 168520 2007-04-09 01:44:16Z gshapiro $
18c18
< SM_RCSID("@(#)$Id: savemail.c,v 8.308 2006/04/18 01:31:33 ca Exp $")
---
> SM_RCSID("@(#)$Id: savemail.c,v 8.313 2006/11/29 00:20:41 ca Exp $")
198c198
< expand("\201n", buf, sizeof buf, e);
---
> expand("\201n", buf, sizeof(buf), e);
209c209
< buf, sizeof buf) != NULL &&
---
> buf, sizeof(buf)) != NULL &&
256c256
< sizeof from) >= sizeof from)
---
> sizeof(from)) >= sizeof(from))
310c310
< expand(DoubleBounceAddr, buf, sizeof buf, e);
---
> expand(DoubleBounceAddr, buf, sizeof(buf), e);
376c376
< expand("\201z/dead.letter", dlbuf, sizeof dlbuf, e);
---
> expand("\201z/dead.letter", dlbuf, sizeof(dlbuf), e);
427c427
< memset(&mcibuf, '\0', sizeof mcibuf);
---
> memset(&mcibuf, '\0', sizeof(mcibuf));
611c611
< addheader("To", q->q_paddr, 0, ee);
---
> addheader("To", q->q_paddr, 0, ee, true);
630,631c630,631
< addheader("MIME-Version", "1.0", 0, ee);
< (void) sm_snprintf(buf, sizeof buf, "%s.%ld/%.100s",
---
> addheader("MIME-Version", "1.0", 0, ee, true);
> (void) sm_snprintf(buf, sizeof(buf), "%s.%ld/%.100s",
634c634
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
641c641
< addheader("Content-Type", buf, 0, ee);
---
> addheader("Content-Type", buf, 0, ee, true);
649c649
< addheader("Content-Transfer-Encoding", p, 0, ee);
---
> addheader("Content-Transfer-Encoding", p, 0, ee, true);
653c653
< addheader("Subject", msg, 0, ee);
---
> addheader("Subject", msg, 0, ee, true);
658c658
< addheader("Subject", msg, 0, ee);
---
> addheader("Subject", msg, 0, ee, true);
663c663
< addheader("Subject", msg, 0, ee);
---
> addheader("Subject", msg, 0, ee, true);
668c668
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
670c670
< addheader("Subject", buf, 0, ee);
---
> addheader("Subject", buf, 0, ee, true);
675c675
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
677c677
< addheader("Subject", buf, 0, ee);
---
> addheader("Subject", buf, 0, ee, true);
680,681c680,681
< (void) sm_snprintf(buf, sizeof buf, "auto-generated (%s)", p);
< addheader("Auto-Submitted", buf, 0, ee);
---
> (void) sm_snprintf(buf, sizeof(buf), "auto-generated (%s)", p);
> addheader("Auto-Submitted", buf, 0, ee, true);
684c684
< expand("\201n", buf, sizeof buf, e);
---
> expand("\201n", buf, sizeof(buf), e);
781c781
< (void) sm_strlcpyn(buf, sizeof buf, 2, "--", e->e_msgboundary);
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "--", e->e_msgboundary);
819c819
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
824c824
< expand("from \201_", buf, sizeof buf, e->e_parent);
---
> expand("from \201_", buf, sizeof(buf), e->e_parent);
831c831
< (void) sm_strlcpyn(buf, sizeof buf, 2, "with id ",
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "with id ",
859c859
< sizeof buf) != NULL)
---
> sizeof(buf)) != NULL)
861,863c861,871
< translate_dollars(buf);
< expand(buf, buf, sizeof buf, e);
< if (!putline(buf, mci))
---
> int lbs;
> bool putok;
> char *lbp;
>
> lbs = sizeof(buf);
> lbp = translate_dollars(buf, buf, &lbs);
> expand(lbp, lbp, lbs, e);
> putok = putline(lbp, mci);
> if (lbp != buf)
> sm_free(lbp);
> if (!putok)
873c881
< expand(ErrMsgFile, buf, sizeof buf, e);
---
> expand(ErrMsgFile, buf, sizeof(buf), e);
900c908
< sizeof buf);
---
> sizeof(buf));
905c913
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
914c922
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
944c952
< sizeof buf);
---
> sizeof(buf));
949c957
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
997c1005
< (void) sm_snprintf(buf, sizeof buf, "%s (%s)",
---
> (void) sm_snprintf(buf, sizeof(buf), "%s (%s)",
1003c1011
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1032c1040
< sizeof buf) != NULL)
---
> sizeof(buf)) != NULL)
1051c1059
< (void) sm_strlcpyn(buf, sizeof buf, 2, "--", e->e_msgboundary);
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "--", e->e_msgboundary);
1065c1073
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1073c1081
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1087c1095
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1095c1103
< (void) sm_strlcpyn(buf, sizeof buf, 2, "Arrival-Date: ",
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "Arrival-Date: ",
1106c1114
< (void) sm_strlcpyn(buf, sizeof buf, 2,
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2,
1159c1167
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1180c1188
< sizeof actual,
---
> sizeof(actual),
1188c1196
< sizeof actual,
---
> sizeof(actual),
1209c1217
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1219d1226
< #if _FFR_PRIV_NOACTUALRECIPIENT
1221d1227
< #endif /* _FFR_PRIV_NOACTUALRECIPIENT */
1224c1230
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1232c1238
< (void) sm_strlcpyn(buf, sizeof buf, 2, "Action: ",
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "Action: ",
1246c1252
< (void) sm_strlcpyn(buf, sizeof buf, 2, "Status: ", p);
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "Status: ", p);
1256c1262
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1272c1278
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1282c1288
< (void) sm_strlcpyn(buf, sizeof buf, 2,
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2,
1295c1301
< (void) sm_strlcpyn(buf, sizeof buf, 2,
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2,
1329c1335
< (void) sm_strlcpyn(buf, sizeof buf, 2, "--",
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "--",
1334c1340
< (void) sm_strlcpyn(buf, sizeof buf, 2, "Content-Type: ",
---
> (void) sm_strlcpyn(buf, sizeof(buf), 2, "Content-Type: ",
1349c1355
< (void) sm_snprintf(buf, sizeof buf,
---
> (void) sm_snprintf(buf, sizeof(buf),
1386c1392
< (void) sm_strlcpyn(buf, sizeof buf, 3, "--", e->e_msgboundary,
---
> (void) sm_strlcpyn(buf, sizeof(buf), 3, "--", e->e_msgboundary,
1730c1736
< if (i >= sizeof hostbuf)
---
> if (i >= sizeof(hostbuf))
1732c1738
< (void) sm_strlcpy(hostbuf, at + 1, sizeof hostbuf);
---
> (void) sm_strlcpy(hostbuf, at + 1, sizeof(hostbuf));
1748,1749c1754,1755
< strlen(comma + 2) < sizeof hostbuf)
< (void) sm_strlcpy(hostbuf, comma + 2, sizeof hostbuf);
---
> strlen(comma + 2) < sizeof(hostbuf))
> (void) sm_strlcpy(hostbuf, comma + 2, sizeof(hostbuf));