]> git.pld-linux.org Git - packages/metamail.git/blob - metamail-security.patch
- allow overriding PAGER with $METAMAIL_PAGER (based on -csh patch)
[packages/metamail.git] / metamail-security.patch
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
4 @@ -1207,9 +1207,9 @@
5      fprintf(outfp, "Content-type: %s", ContentType);
6      for (j=0; j<CParamsUsed; ++j) {
7          fprintf(outfp, " ; ");
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]);
13      }
14      fprintf(outfp, "\n\n"); 
15      TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType);
16 @@ -2032,7 +2032,8 @@
17      if (lc2strcmp(charset, PrevCharset)) {
18          char *s2, *charsetinuse;
19  
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);
25          }
26 @@ -2042,7 +2043,7 @@
27          }
28      }
29      if (ecode == ENCODING_NONE) {
30 -        printf(txt+1);
31 +        printf("%s", txt+1);
32      } else {
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
38 @@ -367,7 +367,8 @@
39      }
40      if (!ULstrcmp(s, "subject")) {
41          *colon = ':';
42 -        strcpy(SubjectBuf, ++colon);
43 +        strncpy(SubjectBuf, ++colon, sizeof(SubjectBuf));
44 +        SubjectBuf[sizeof(SubjectBuf) - 1] = '\0';
45          return(0);
46      }
47      if (!ULstrcmp(s, "content-type")) {
This page took 0.053761 seconds and 3 git commands to generate.