From 40a3b0ef5ff3ee0938d700db2c51c300243c5e67 Mon Sep 17 00:00:00 2001 From: Johan van Selst Date: Mon, 25 Jul 2011 18:54:26 +0000 Subject: - Respect $CC - Fix build with clang - Regenerate patchfiles after including the clang patches --- mail/emil/files/patch-Makefile.in | 27 +++++++++ mail/emil/files/patch-aa | 10 --- mail/emil/files/patch-ab | 27 --------- mail/emil/files/patch-ac | 47 --------------- mail/emil/files/patch-ad | 38 ------------ mail/emil/files/patch-ae | 43 ------------- mail/emil/files/patch-charset_chset.c | 11 ++++ mail/emil/files/patch-charset_conv.c | 15 +++++ mail/emil/files/patch-charset_dfopen.c | 10 +++ mail/emil/files/patch-charset_gc.c | 11 ++++ mail/emil/files/patch-configure | 10 +++ mail/emil/files/patch-emil.cf.man | 38 ++++++++++++ mail/emil/files/patch-emil.man | 47 +++++++++++++++ mail/emil/files/patch-main.c | 54 ++++++++++++++--- mail/emil/files/patch-mime.c | 46 ++++++++++++++ mail/emil/files/patch-mimeparse.c | 43 +++++++++++++ mail/emil/files/patch-security-advisory | 104 -------------------------------- mail/emil/files/patch-uuencode.c | 20 ++++++ mail/emil/pkg-plist | 70 ++++++++++----------- 19 files changed, 357 insertions(+), 314 deletions(-) create mode 100644 mail/emil/files/patch-Makefile.in delete mode 100644 mail/emil/files/patch-aa delete mode 100644 mail/emil/files/patch-ab delete mode 100644 mail/emil/files/patch-ac delete mode 100644 mail/emil/files/patch-ad delete mode 100644 mail/emil/files/patch-ae create mode 100644 mail/emil/files/patch-charset_chset.c create mode 100644 mail/emil/files/patch-charset_conv.c create mode 100644 mail/emil/files/patch-charset_dfopen.c create mode 100644 mail/emil/files/patch-charset_gc.c create mode 100644 mail/emil/files/patch-configure create mode 100644 mail/emil/files/patch-emil.cf.man create mode 100644 mail/emil/files/patch-emil.man create mode 100644 mail/emil/files/patch-mime.c create mode 100644 mail/emil/files/patch-mimeparse.c delete mode 100644 mail/emil/files/patch-security-advisory create mode 100644 mail/emil/files/patch-uuencode.c (limited to 'mail/emil') diff --git a/mail/emil/files/patch-Makefile.in b/mail/emil/files/patch-Makefile.in new file mode 100644 index 000000000000..62b2b3c4fe60 --- /dev/null +++ b/mail/emil/files/patch-Makefile.in @@ -0,0 +1,27 @@ +--- Makefile.in.orig 1996-06-04 13:54:32.000000000 +0200 ++++ Makefile.in 2011-07-25 20:21:13.000000000 +0200 +@@ -41,9 +41,10 @@ exec_prefix = @exec_prefix@ + #manprefix = + + bindir = @bindir@ ++datadir = @datadir@ + libdir = @libdir@ + mandir = @mandir@ +-manext = 8 ++manext = 1 + + MAINCF = $(libdir)/emil.cf + CHARFILE = $(libdir)/charsets.cpl +@@ -262,6 +263,12 @@ install: installdirs + $(INSTALL_DATA) emil.cf.$(manext) $(mandir)/man$(manext); \ + fi ; + @echo " " ; ++.if !defined(NOPORTDOCS) ++ $(srcdir)/mkinstalldirs $(datadir)/doc/emil ++ @echo "Installing doc files in $(datadir)/doc/emil" ; ++ @$(INSTALL_DATA) $(DOCS) $(datadir)/doc/emil/ ++.endif ++ @echo " " ; + @echo "Installation done." ; + + installdirs: diff --git a/mail/emil/files/patch-aa b/mail/emil/files/patch-aa deleted file mode 100644 index dcddad76e37b..000000000000 --- a/mail/emil/files/patch-aa +++ /dev/null @@ -1,10 +0,0 @@ ---- charset/dfopen.c~ Tue Nov 29 07:10:29 1994 -+++ charset/dfopen.c Tue Apr 21 02:35:35 1998 -@@ -1,7 +1,6 @@ - #include "iso646.h" - #include - #include --#include - #include /* TW 941114 */ - #include /* TW 941114 */ - #include /* TW 941114 */ diff --git a/mail/emil/files/patch-ab b/mail/emil/files/patch-ab deleted file mode 100644 index f04c8a8b7679..000000000000 --- a/mail/emil/files/patch-ab +++ /dev/null @@ -1,27 +0,0 @@ ---- Makefile.in.orig 1996-06-04 19:54:32.000000000 +0800 -+++ Makefile.in 2008-08-24 21:42:48.000000000 +0800 -@@ -41,9 +41,10 @@ - #manprefix = - - bindir = @bindir@ -+datadir = @datadir@ - libdir = @libdir@ - mandir = @mandir@ --manext = 8 -+manext = 1 - - MAINCF = $(libdir)/emil.cf - CHARFILE = $(libdir)/charsets.cpl -@@ -262,6 +263,12 @@ - $(INSTALL_DATA) emil.cf.$(manext) $(mandir)/man$(manext); \ - fi ; - @echo " " ; -+.if !defined(NOPORTDOCS) -+ $(srcdir)/mkinstalldirs $(datadir)/doc/emil -+ @echo "Installing doc files in $(datadir)/doc/emil" ; -+ @$(INSTALL_DATA) $(DOCS) $(datadir)/doc/emil/ -+.endif -+ @echo " " ; - @echo "Installation done." ; - - installdirs: diff --git a/mail/emil/files/patch-ac b/mail/emil/files/patch-ac deleted file mode 100644 index 2a0b6a9fc68b..000000000000 --- a/mail/emil/files/patch-ac +++ /dev/null @@ -1,47 +0,0 @@ ---- emil.man~ Tue Jun 4 04:42:42 1996 -+++ emil.man Tue Apr 21 04:08:04 1998 -@@ -1,4 +1,4 @@ --.TH EMIL 8 "19 December 1994" -+.TH EMIL 1 "19 December 1994" - - .SH NAME - -@@ -63,7 +63,7 @@ - .BR no - spooling. - --Emil can be applied by sendmail, if specified as a delviery agent, and can also -+Emil can be applied by sendmail, if specified as a delivery agent, and can also - invoke sendmail or other programs for it's output. - When used like this, emil does not close the connection with the calling - sendmail until it returns an EX_OK from the called program, -@@ -151,17 +151,17 @@ - .TP - .BI "\-H " Recipient_header_encoding - Recipient header encoding. One of Se, 7bit, 8bit, BAse64 or Quoted-printable. --See also emil.cf(8). -+See also emil.cf(1). - .TP - .BI "\-T " Recipient_text_encoding - Recipient text encoding. One of Se, 7bit, 8bit, BAse64, BInhex, Quoted-printable --or Uuencode. See also emil.cf(8). -+or Uuencode. See also emil.cf(1). - .TP - .BI "\-G " Target_Group - Use Target_Group to specify use of a conversion group, as declared in emil.cf. - If Target_Group is specified Emil will not try to resolve conversion group - using recipient, sender and recipient host, instead it performs a case --sensitive match on the conversion groups as declared in emil.cf. See also emil.cf(8). -+sensitive match on the conversion groups as declared in emil.cf. See also emil.cf(1). - - .RE - Beware, when applying the Sender_charset option, there is no -@@ -243,7 +243,7 @@ - - .SH "SEE ALSO" - --emil.cf(8) -+emil.cf(1) - - .SH BUGS - diff --git a/mail/emil/files/patch-ad b/mail/emil/files/patch-ad deleted file mode 100644 index c7525aea781c..000000000000 --- a/mail/emil/files/patch-ad +++ /dev/null @@ -1,38 +0,0 @@ ---- emil.cf.man~ Sat Feb 10 05:16:17 1996 -+++ emil.cf.man Tue Apr 21 04:10:45 1998 -@@ -1,6 +1,6 @@ --.TH EMIL.CF 8 "19 December 1994" -+.TH EMIL.CF 1 "19 December 1994" - .SH NAME --emil.cf \- configuration file for emil(8) -+emil.cf \- configuration file for emil(1) - .SH SYNOPSIS - .B group - .IR "Group_Name" ":" -@@ -45,7 +45,7 @@ - .SH DESCRIPTION - The file - MAINCF --is used by emil(8) to decide which conversions should be applied to a specific -+is used by emil(1) to decide which conversions should be applied to a specific - Internet - message. Conversion is controlled by the combination of - .IR Sender, -@@ -127,7 +127,7 @@ - Pick one of Base64, Quoted-printable, 8bit or Se, 7bit. - 7bit is default. If BAse64 or Quoted-Printable is selected - headers are converted according to RFC1522 (MIME-II). --7bit and Se behaives like in the textenc field. -+7bit and Se behaves like in the textenc field. - - .TP - .B "match" -@@ -205,7 +205,7 @@ - Martin Wendel (Martin.Wendel@its.uu.se) and - Torbjorn Wictorin (Torbjorn.Wictorin@its.uu.se) - .SH "SEE ALSO" --emil(8) -+emil(1) - .SH BUGS - None - diff --git a/mail/emil/files/patch-ae b/mail/emil/files/patch-ae deleted file mode 100644 index cbd6c106a0b4..000000000000 --- a/mail/emil/files/patch-ae +++ /dev/null @@ -1,43 +0,0 @@ ---- mimeparse.c~ Tue Jun 4 06:36:59 1996 -+++ mimeparse.c Tue Apr 21 05:02:15 1998 -@@ -219,8 +219,39 @@ - inbuf->bodystart, - inbuf->bodyend); - #endif -+ /* FIX */ -+ if (m->sd->encoding == EMULTI && m->sd->endbound != NULL) -+ { -+ int tttt; -+ move_past_boundary(m, m->sd->endbound); -+ for (;;) -+ { -+ tttt = getline(m->sd); -+#ifdef DEBUG -+ if (edebug) -+ fprintf(stderr," getline = %d\n", tttt); -+#endif -+ if (tttt == 1) -+ { -+ inbuf->offset += tttt; -+ inbuf->loffset += 1; -+ continue; -+ } -+ if (tttt == 2 && *(m->sd->contents + m->sd->offset) == '\r') -+ { -+ inbuf->offset += tttt; -+ inbuf->loffset += 1; -+ continue; -+ } -+ break; -+ } -+ -+ } -+ else -+ /* END_FIX */ -+ m->sd->offset = m->sd->bodyend; -+ - -- m->sd->offset = m->sd->bodyend; - if (getline(m->sd) == 0) - return(OK); - if (m->sd->offset < m->sd->end) diff --git a/mail/emil/files/patch-charset_chset.c b/mail/emil/files/patch-charset_chset.c new file mode 100644 index 000000000000..64bf3136cf33 --- /dev/null +++ b/mail/emil/files/patch-charset_chset.c @@ -0,0 +1,11 @@ +--- charset/chset.c.orig 2011-07-25 20:25:55.000000000 +0200 ++++ charset/chset.c 2011-07-25 20:25:56.000000000 +0200 +@@ -42,7 +42,7 @@ int i; + return s; + } + +-void ++int + main (argc, argv) + int argc; + char **argv; diff --git a/mail/emil/files/patch-charset_conv.c b/mail/emil/files/patch-charset_conv.c new file mode 100644 index 000000000000..20a2c1f76dd4 --- /dev/null +++ b/mail/emil/files/patch-charset_conv.c @@ -0,0 +1,15 @@ +--- charset/conv.c.orig 2011-07-25 20:26:26.000000000 +0200 ++++ charset/conv.c 2011-07-25 20:25:30.000000000 +0200 +@@ -65,10 +65,10 @@ Char *b, *bm; + } + + +-void ++int + main (argc, argv) + int argc; +- Char **argv; ++ char **argv; + { + Char s ARRAY(SLEN), r ARRAY(SLEN), *opt=NULL, *o=r, c; + char dk ARRAY(3), us ARRAY(3); diff --git a/mail/emil/files/patch-charset_dfopen.c b/mail/emil/files/patch-charset_dfopen.c new file mode 100644 index 000000000000..550b1f47f1bc --- /dev/null +++ b/mail/emil/files/patch-charset_dfopen.c @@ -0,0 +1,10 @@ +--- charset/dfopen.c.orig 1994-11-29 16:10:29.000000000 +0100 ++++ charset/dfopen.c 2011-07-25 20:21:13.000000000 +0200 +@@ -1,7 +1,6 @@ + #include "iso646.h" + #include + #include +-#include + #include /* TW 941114 */ + #include /* TW 941114 */ + #include /* TW 941114 */ diff --git a/mail/emil/files/patch-charset_gc.c b/mail/emil/files/patch-charset_gc.c new file mode 100644 index 000000000000..957d2f18ec63 --- /dev/null +++ b/mail/emil/files/patch-charset_gc.c @@ -0,0 +1,11 @@ +--- charset/gc.c.orig 2011-07-25 20:24:02.000000000 +0200 ++++ charset/gc.c 2011-07-25 20:24:04.000000000 +0200 +@@ -256,7 +256,7 @@ char *file, *mode; + } + + +-void ++int + main (argc, argv) + int argc; char **argv; { + diff --git a/mail/emil/files/patch-configure b/mail/emil/files/patch-configure new file mode 100644 index 000000000000..9458efb87877 --- /dev/null +++ b/mail/emil/files/patch-configure @@ -0,0 +1,10 @@ +--- configure.orig 1996-04-19 12:22:41.000000000 +0200 ++++ configure 2011-07-25 20:21:58.000000000 +0200 +@@ -513,7 +513,6 @@ fi + + + +-CC=gcc + for ac_prog in 'bison -y' byacc + do + # Extract the first word of "$ac_prog", so it can be a program name with args. diff --git a/mail/emil/files/patch-emil.cf.man b/mail/emil/files/patch-emil.cf.man new file mode 100644 index 000000000000..be87c9845c3f --- /dev/null +++ b/mail/emil/files/patch-emil.cf.man @@ -0,0 +1,38 @@ +--- emil.cf.man.orig 1996-02-10 14:16:17.000000000 +0100 ++++ emil.cf.man 2011-07-25 20:21:13.000000000 +0200 +@@ -1,6 +1,6 @@ +-.TH EMIL.CF 8 "19 December 1994" ++.TH EMIL.CF 1 "19 December 1994" + .SH NAME +-emil.cf \- configuration file for emil(8) ++emil.cf \- configuration file for emil(1) + .SH SYNOPSIS + .B group + .IR "Group_Name" ":" +@@ -45,7 +45,7 @@ emil.cf \- configuration file for emil(8 + .SH DESCRIPTION + The file + MAINCF +-is used by emil(8) to decide which conversions should be applied to a specific ++is used by emil(1) to decide which conversions should be applied to a specific + Internet + message. Conversion is controlled by the combination of + .IR Sender, +@@ -127,7 +127,7 @@ european languages. + Pick one of Base64, Quoted-printable, 8bit or Se, 7bit. + 7bit is default. If BAse64 or Quoted-Printable is selected + headers are converted according to RFC1522 (MIME-II). +-7bit and Se behaives like in the textenc field. ++7bit and Se behaves like in the textenc field. + + .TP + .B "match" +@@ -205,7 +205,7 @@ sender, recipient and mail relay. These + Martin Wendel (Martin.Wendel@its.uu.se) and + Torbjorn Wictorin (Torbjorn.Wictorin@its.uu.se) + .SH "SEE ALSO" +-emil(8) ++emil(1) + .SH BUGS + None + diff --git a/mail/emil/files/patch-emil.man b/mail/emil/files/patch-emil.man new file mode 100644 index 000000000000..d9dd16831eca --- /dev/null +++ b/mail/emil/files/patch-emil.man @@ -0,0 +1,47 @@ +--- emil.man.orig 1996-06-04 13:42:42.000000000 +0200 ++++ emil.man 2011-07-25 20:21:13.000000000 +0200 +@@ -1,4 +1,4 @@ +-.TH EMIL 8 "19 December 1994" ++.TH EMIL 1 "19 December 1994" + + .SH NAME + +@@ -63,7 +63,7 @@ the changes in encoding and formatting i + .BR no + spooling. + +-Emil can be applied by sendmail, if specified as a delviery agent, and can also ++Emil can be applied by sendmail, if specified as a delivery agent, and can also + invoke sendmail or other programs for it's output. + When used like this, emil does not close the connection with the calling + sendmail until it returns an EX_OK from the called program, +@@ -151,17 +151,17 @@ RFC822. + .TP + .BI "\-H " Recipient_header_encoding + Recipient header encoding. One of Se, 7bit, 8bit, BAse64 or Quoted-printable. +-See also emil.cf(8). ++See also emil.cf(1). + .TP + .BI "\-T " Recipient_text_encoding + Recipient text encoding. One of Se, 7bit, 8bit, BAse64, BInhex, Quoted-printable +-or Uuencode. See also emil.cf(8). ++or Uuencode. See also emil.cf(1). + .TP + .BI "\-G " Target_Group + Use Target_Group to specify use of a conversion group, as declared in emil.cf. + If Target_Group is specified Emil will not try to resolve conversion group + using recipient, sender and recipient host, instead it performs a case +-sensitive match on the conversion groups as declared in emil.cf. See also emil.cf(8). ++sensitive match on the conversion groups as declared in emil.cf. See also emil.cf(1). + + .RE + Beware, when applying the Sender_charset option, there is no +@@ -243,7 +243,7 @@ Torbjorn Wictorin (Torbjorn.Wictorin@its + + .SH "SEE ALSO" + +-emil.cf(8) ++emil.cf(1) + + .SH BUGS + diff --git a/mail/emil/files/patch-main.c b/mail/emil/files/patch-main.c index b215196776ab..f7e0667cc0c2 100644 --- a/mail/emil/files/patch-main.c +++ b/mail/emil/files/patch-main.c @@ -1,22 +1,56 @@ -$FreeBSD$ - ---- main.c.orig Thu Mar 28 20:57:50 2002 -+++ main.c Thu Mar 28 20:58:31 2002 -@@ -69,7 +69,7 @@ +--- main.c.orig 1996-06-04 15:36:58.000000000 +0200 ++++ main.c 2011-07-25 20:32:45.000000000 +0200 +@@ -69,7 +69,7 @@ int spawn_mailer = 0; int pseudo_route = 0; int in_fd = 0; -FILE * out_fd = stdout; -+FILE * out_fd; ++FILE * out_fd = NULL; FILE * char_fd = NULL; FILE * conf_fd = NULL; off_t pz; -@@ -83,7 +83,7 @@ - int no_run = FALSE; +@@ -84,6 +84,8 @@ int main(int argc, char *argv[]) char *cmailer = NULL; char *member = NULL; -- -+ out_fd = stdout; + ++ out_fd = stdout; ++ #ifdef HAVE_GETPAGESIZE pz = (off_t) getpagesize(); #elif defined(hpux) || defined(_AUX_SOURCE) +@@ -177,7 +179,7 @@ int main(int argc, char *argv[]) + sprintf(ebuf,"Invalid parameter to -f: %s",optarg); + #ifdef DEBUG + if (edebug) +- fprintf(stderr, ebuf); ++ fprintf(stderr, "%s", ebuf); + #endif + logger(LOG_WARNING,ebuf); + } +@@ -303,7 +305,7 @@ int main(int argc, char *argv[]) + sprintf(ebuf,"Invalid flag: -%c",c); + #ifdef DEBUG + if (edebug) +- fprintf(stderr, ebuf); ++ fprintf(stderr, "%s", ebuf); + #endif + logger(LOG_WARNING,ebuf); + } +@@ -359,7 +361,7 @@ int main(int argc, char *argv[]) + sprintf(ebuf, "Invalid mailer specification %s", optarg); + #ifdef DEBUG + if (edebug) +- fprintf(stderr, ebuf); ++ fprintf(stderr, "%s", ebuf); + #endif + logger(LOG_ERR, ebuf); + fprintf(stderr, "Emil: %s\n", ebuf); +@@ -448,7 +450,7 @@ int main(int argc, char *argv[]) + ); + #ifdef DEBUG + if (edebug) +- fprintf(stderr, ebuf); ++ fprintf(stderr, "%s", ebuf); + #endif + logger(LOG_DEBUG,ebuf); + if (source == NULL) diff --git a/mail/emil/files/patch-mime.c b/mail/emil/files/patch-mime.c new file mode 100644 index 000000000000..d2f4b15996c2 --- /dev/null +++ b/mail/emil/files/patch-mime.c @@ -0,0 +1,46 @@ +--- mime.c.orig 1996-06-04 15:36:59.000000000 +0200 ++++ mime.c 2011-07-25 20:21:13.000000000 +0200 +@@ -56,18 +56,18 @@ encode_mime(struct message *m) + if (match(m->sd->type, "TEXT")) + { + if (m->td->charset != NULL) +- sprintf(buf, "%s; charset=\"%s\"", ct, m->td->charset); ++ snprintf(buf, sizeof(buf), "%s; charset=\"%s\"", ct, m->td->charset); + else +- sprintf(buf, "%s", ct); ++ snprintf(buf, sizeof(buf), "%s", ct); + } + else + if (match(m->sd->type, "MULTIPART")) + { + bb = (char *)getmimebound(); + if (m->sd->applefile == AMDOUBLE) +- sprintf(buf, "Multipart/AppleDouble; boundary=\"%s\"", bb); ++ snprintf(buf, sizeof(buf), "Multipart/AppleDouble; boundary=\"%s\"", bb); + else +- sprintf(buf,"%s; boundary=\"%s\"", ct, bb); ++ snprintf(buf, sizeof(buf), "%s; boundary=\"%s\"", ct, bb); + m->td->startbound = (char *)Yalloc(MIMEBOUNDLEN + 5); + m->td->endbound = (char *)Yalloc(MIMEBOUNDLEN + 7); + sprintf(m->td->startbound, "--%s", bb); +@@ -75,7 +75,7 @@ encode_mime(struct message *m) + } + else + { +- sprintf(buf, "%s", ct); ++ snprintf(buf, sizeof(buf), "%s", ct); + } + } + else +@@ -87,7 +87,10 @@ encode_mime(struct message *m) + + if (m->sd->name != NULL) + { +- sprintf(buf, "%s; name=\"%s\"", buf, m->sd->name); ++ char *buf2; ++ buf2 = strdup(buf); ++ snprintf(buf, sizeof(buf), "%s; name=\"%s\"", buf2, m->sd->name); ++ free(buf2); + } + add_header(m, "Content-Type", buf, MIME); + if (bb != NULL) diff --git a/mail/emil/files/patch-mimeparse.c b/mail/emil/files/patch-mimeparse.c new file mode 100644 index 000000000000..19b25881742c --- /dev/null +++ b/mail/emil/files/patch-mimeparse.c @@ -0,0 +1,43 @@ +--- mimeparse.c.orig 1996-06-04 15:36:59.000000000 +0200 ++++ mimeparse.c 2011-07-25 20:21:13.000000000 +0200 +@@ -219,8 +219,39 @@ parse_mime_siblings(struct message *m) + inbuf->bodystart, + inbuf->bodyend); + #endif ++ /* FIX */ ++ if (m->sd->encoding == EMULTI && m->sd->endbound != NULL) ++ { ++ int tttt; ++ move_past_boundary(m, m->sd->endbound); ++ for (;;) ++ { ++ tttt = getline(m->sd); ++#ifdef DEBUG ++ if (edebug) ++ fprintf(stderr," getline = %d\n", tttt); ++#endif ++ if (tttt == 1) ++ { ++ inbuf->offset += tttt; ++ inbuf->loffset += 1; ++ continue; ++ } ++ if (tttt == 2 && *(m->sd->contents + m->sd->offset) == '\r') ++ { ++ inbuf->offset += tttt; ++ inbuf->loffset += 1; ++ continue; ++ } ++ break; ++ } ++ ++ } ++ else ++ /* END_FIX */ ++ m->sd->offset = m->sd->bodyend; ++ + +- m->sd->offset = m->sd->bodyend; + if (getline(m->sd) == 0) + return(OK); + if (m->sd->offset < m->sd->end) diff --git a/mail/emil/files/patch-security-advisory b/mail/emil/files/patch-security-advisory deleted file mode 100644 index b37072a49c07..000000000000 --- a/mail/emil/files/patch-security-advisory +++ /dev/null @@ -1,104 +0,0 @@ ---- mime.c.old 1996-06-04 15:36:59.000000000 +0200 -+++ mime.c 2004-02-26 16:57:42.000000000 +0100 -@@ -56,18 +56,18 @@ - if (match(m->sd->type, "TEXT")) - { - if (m->td->charset != NULL) -- sprintf(buf, "%s; charset=\"%s\"", ct, m->td->charset); -+ snprintf(buf, sizeof(buf), "%s; charset=\"%s\"", ct, m->td->charset); - else -- sprintf(buf, "%s", ct); -+ snprintf(buf, sizeof(buf), "%s", ct); - } - else - if (match(m->sd->type, "MULTIPART")) - { - bb = (char *)getmimebound(); - if (m->sd->applefile == AMDOUBLE) -- sprintf(buf, "Multipart/AppleDouble; boundary=\"%s\"", bb); -+ snprintf(buf, sizeof(buf), "Multipart/AppleDouble; boundary=\"%s\"", bb); - else -- sprintf(buf,"%s; boundary=\"%s\"", ct, bb); -+ snprintf(buf, sizeof(buf), "%s; boundary=\"%s\"", ct, bb); - m->td->startbound = (char *)Yalloc(MIMEBOUNDLEN + 5); - m->td->endbound = (char *)Yalloc(MIMEBOUNDLEN + 7); - sprintf(m->td->startbound, "--%s", bb); -@@ -75,7 +75,7 @@ - } - else - { -- sprintf(buf, "%s", ct); -+ snprintf(buf, sizeof(buf), "%s", ct); - } - } - else -@@ -87,7 +87,10 @@ - - if (m->sd->name != NULL) - { -- sprintf(buf, "%s; name=\"%s\"", buf, m->sd->name); -+ char *buf2; -+ buf2 = strdup(buf); -+ snprintf(buf, sizeof(buf), "%s; name=\"%s\"", buf2, m->sd->name); -+ free(buf2); - } - add_header(m, "Content-Type", buf, MIME); - if (bb != NULL) ---- uuencode.c.old 1996-06-04 15:37:02.000000000 +0200 -+++ uuencode.c 2004-02-26 17:01:09.000000000 +0100 -@@ -116,7 +116,7 @@ - /* Start with uuencode preamble */ - fix_filename(m); - -- sprintf(outb,"begin 644 %s\n", m->sd->name); -+ snprintf(outb, sizeof(outb), "begin 644 %s\n", m->sd->name); - append_data(outbuf, outb, strlen(outb), pz); - outbuf->lineend += 1; - i = 0; -@@ -242,7 +242,7 @@ - inb++; - inbuf->offset += 1; - } -- if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%s", filename)) != 1) -+ if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%511s", filename)) != 1) - { - #ifdef DEBUG - if (edebug) ---- main.c.old 1996-06-04 15:36:58.000000000 +0200 -+++ main.c 2004-02-26 17:02:18.000000000 +0100 -@@ -177,7 +177,7 @@ - sprintf(ebuf,"Invalid parameter to -f: %s",optarg); - #ifdef DEBUG - if (edebug) -- fprintf(stderr, ebuf); -+ fprintf(stderr, "%s", ebuf); - #endif - logger(LOG_WARNING,ebuf); - } -@@ -303,7 +303,7 @@ - sprintf(ebuf,"Invalid flag: -%c",c); - #ifdef DEBUG - if (edebug) -- fprintf(stderr, ebuf); -+ fprintf(stderr, "%s", ebuf); - #endif - logger(LOG_WARNING,ebuf); - } -@@ -359,7 +359,7 @@ - sprintf(ebuf, "Invalid mailer specification %s", optarg); - #ifdef DEBUG - if (edebug) -- fprintf(stderr, ebuf); -+ fprintf(stderr, "%s", ebuf); - #endif - logger(LOG_ERR, ebuf); - fprintf(stderr, "Emil: %s\n", ebuf); -@@ -448,7 +448,7 @@ - ); - #ifdef DEBUG - if (edebug) -- fprintf(stderr, ebuf); -+ fprintf(stderr, "%s", ebuf); - #endif - logger(LOG_DEBUG,ebuf); - if (source == NULL) diff --git a/mail/emil/files/patch-uuencode.c b/mail/emil/files/patch-uuencode.c new file mode 100644 index 000000000000..d43ab6a870f4 --- /dev/null +++ b/mail/emil/files/patch-uuencode.c @@ -0,0 +1,20 @@ +--- uuencode.c.orig 1996-06-04 15:37:02.000000000 +0200 ++++ uuencode.c 2011-07-25 20:21:13.000000000 +0200 +@@ -116,7 +116,7 @@ encode_uuencode(struct message *m) + /* Start with uuencode preamble */ + fix_filename(m); + +- sprintf(outb,"begin 644 %s\n", m->sd->name); ++ snprintf(outb, sizeof(outb), "begin 644 %s\n", m->sd->name); + append_data(outbuf, outb, strlen(outb), pz); + outbuf->lineend += 1; + i = 0; +@@ -242,7 +242,7 @@ decode_uuencode(struct message *m) + inb++; + inbuf->offset += 1; + } +- if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%s", filename)) != 1) ++ if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%511s", filename)) != 1) + { + #ifdef DEBUG + if (edebug) diff --git a/mail/emil/pkg-plist b/mail/emil/pkg-plist index ee76553d658f..ed618fc5b7cb 100644 --- a/mail/emil/pkg-plist +++ b/mail/emil/pkg-plist @@ -1,38 +1,38 @@ bin/emil lib/charsets.cpl lib/emil.cf -%%PORTDOCS%%share/doc/emil/analysis.html -%%PORTDOCS%%share/doc/emil/arguments.html -%%PORTDOCS%%share/doc/emil/arrow_left3.gif -%%PORTDOCS%%share/doc/emil/arrow_right3.gif -%%PORTDOCS%%share/doc/emil/arrow_up2.gif -%%PORTDOCS%%share/doc/emil/binpobox.gif -%%PORTDOCS%%share/doc/emil/comparison.html -%%PORTDOCS%%share/doc/emil/configuration.html -%%PORTDOCS%%share/doc/emil/control.html -%%PORTDOCS%%share/doc/emil/design-spec.html -%%PORTDOCS%%share/doc/emil/design-top.html -%%PORTDOCS%%share/doc/emil/details.html -%%PORTDOCS%%share/doc/emil/emil.cf.html -%%PORTDOCS%%share/doc/emil/end.html -%%PORTDOCS%%share/doc/emil/figure1.gif -%%PORTDOCS%%share/doc/emil/figure2.gif -%%PORTDOCS%%share/doc/emil/figure3.gif -%%PORTDOCS%%share/doc/emil/figure4.gif -%%PORTDOCS%%share/doc/emil/figure5.gif -%%PORTDOCS%%share/doc/emil/figure6.gif -%%PORTDOCS%%share/doc/emil/figure7.gif -%%PORTDOCS%%share/doc/emil/index.shtml -%%PORTDOCS%%share/doc/emil/input.html -%%PORTDOCS%%share/doc/emil/intro.html -%%PORTDOCS%%share/doc/emil/main.html -%%PORTDOCS%%share/doc/emil/output.html -%%PORTDOCS%%share/doc/emil/problem-statement.html -%%PORTDOCS%%share/doc/emil/rfc1521.html -%%PORTDOCS%%share/doc/emil/rfc1522.html -%%PORTDOCS%%share/doc/emil/rfc822.html -%%PORTDOCS%%share/doc/emil/setting.html -%%PORTDOCS%%share/doc/emil/using.html -%%PORTDOCS%%share/doc/emil/way.html -%%PORTDOCS%%share/doc/emil/why.html -%%PORTDOCS%%@dirrm share/doc/emil +%%PORTDOCS%%%%DOCSDIR%%/analysis.html +%%PORTDOCS%%%%DOCSDIR%%/arguments.html +%%PORTDOCS%%%%DOCSDIR%%/arrow_left3.gif +%%PORTDOCS%%%%DOCSDIR%%/arrow_right3.gif +%%PORTDOCS%%%%DOCSDIR%%/arrow_up2.gif +%%PORTDOCS%%%%DOCSDIR%%/binpobox.gif +%%PORTDOCS%%%%DOCSDIR%%/comparison.html +%%PORTDOCS%%%%DOCSDIR%%/configuration.html +%%PORTDOCS%%%%DOCSDIR%%/control.html +%%PORTDOCS%%%%DOCSDIR%%/design-spec.html +%%PORTDOCS%%%%DOCSDIR%%/design-top.html +%%PORTDOCS%%%%DOCSDIR%%/details.html +%%PORTDOCS%%%%DOCSDIR%%/emil.cf.html +%%PORTDOCS%%%%DOCSDIR%%/end.html +%%PORTDOCS%%%%DOCSDIR%%/figure1.gif +%%PORTDOCS%%%%DOCSDIR%%/figure2.gif +%%PORTDOCS%%%%DOCSDIR%%/figure3.gif +%%PORTDOCS%%%%DOCSDIR%%/figure4.gif +%%PORTDOCS%%%%DOCSDIR%%/figure5.gif +%%PORTDOCS%%%%DOCSDIR%%/figure6.gif +%%PORTDOCS%%%%DOCSDIR%%/figure7.gif +%%PORTDOCS%%%%DOCSDIR%%/index.shtml +%%PORTDOCS%%%%DOCSDIR%%/input.html +%%PORTDOCS%%%%DOCSDIR%%/intro.html +%%PORTDOCS%%%%DOCSDIR%%/main.html +%%PORTDOCS%%%%DOCSDIR%%/output.html +%%PORTDOCS%%%%DOCSDIR%%/problem-statement.html +%%PORTDOCS%%%%DOCSDIR%%/rfc1521.html +%%PORTDOCS%%%%DOCSDIR%%/rfc1522.html +%%PORTDOCS%%%%DOCSDIR%%/rfc822.html +%%PORTDOCS%%%%DOCSDIR%%/setting.html +%%PORTDOCS%%%%DOCSDIR%%/using.html +%%PORTDOCS%%%%DOCSDIR%%/way.html +%%PORTDOCS%%%%DOCSDIR%%/why.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% -- cgit v1.2.3