1 diff -dur mm2.7.orig/src/metamail/metamail.c mm2.7/src/metamail/metamail.c
2 --- mm2.7.orig/src/metamail/metamail.c 2004-02-19 09:15:46.000000000 +0100
3 +++ mm2.7/src/metamail/metamail.c 2004-02-19 09:16:13.890664901 +0100
5 fprintf(outfp, "Content-type: %s", ContentType);
6 for (j=0; j<CParamsUsed; ++j) {
8 - fprintf(outfp, CParams[j]);
9 + fprintf(outfp, "%s", CParams[j]);
10 fprintf(outfp, " = ");
11 - fprintf(outfp, CParamValues[j]);
12 + fprintf(outfp, "%s", CParamValues[j]);
14 fprintf(outfp, "\n\n");
15 TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType);
17 if (lc2strcmp(charset, PrevCharset)) {
18 char *s2, *charsetinuse;
20 - strcpy(PrevCharset, charset);
21 + strncpy(PrevCharset, charset, sizeof(PrevCharset));
22 + PrevCharset[sizeof(PrevCharset) - 1] = '\0';
23 for (s2=PrevCharset; *s2; ++s2) {
24 if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2);
29 if (ecode == ENCODING_NONE) {
31 + printf("%s", txt+1);
33 /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */
34 MkTmpFileName(TmpFile);
35 diff -dur mm2.7.orig/src/metamail/splitmail.c mm2.7/src/metamail/splitmail.c
36 --- mm2.7.orig/src/metamail/splitmail.c 2004-02-19 09:15:45.000000000 +0100
37 +++ mm2.7/src/metamail/splitmail.c 2004-02-19 09:16:13.892664767 +0100
40 if (!ULstrcmp(s, "subject")) {
42 - strcpy(SubjectBuf, ++colon);
43 + strncpy(SubjectBuf, ++colon, sizeof(SubjectBuf));
44 + SubjectBuf[sizeof(SubjectBuf) - 1] = '\0';
47 if (!ULstrcmp(s, "content-type")) {