diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2002-08-28 16:07:33 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2002-08-28 16:07:33 +0000 |
commit | e0efc654d1bc248391966503ed6ce4f5042908dc (patch) | |
tree | 8730b0cb61c1ed7d59e33cf21cdc0cf563e1b50e /converters/mpack | |
parent | Wrong version of patch was committed, fix it. (diff) |
Better control filenames validity, ctype fixes
Notes
Notes:
svn path=/head/; revision=65177
Diffstat (limited to 'converters/mpack')
-rw-r--r-- | converters/mpack/files/patch-ab | 16 | ||||
-rw-r--r-- | converters/mpack/files/patch-ad | 26 | ||||
-rw-r--r-- | converters/mpack/files/patch-ae | 46 |
3 files changed, 72 insertions, 16 deletions
diff --git a/converters/mpack/files/patch-ab b/converters/mpack/files/patch-ab index 81754bad4eda..cd9a647b5cb7 100644 --- a/converters/mpack/files/patch-ab +++ b/converters/mpack/files/patch-ab @@ -1,19 +1,3 @@ -*** unixos.c.bak Fri Feb 17 00:39:50 1995 ---- unixos.c Mon Nov 11 10:19:28 1996 -*************** -*** 89,95 **** ---- 89,99 ---- - strcpy(buf, getenv("TMPDIR")); - } - else { -+ #ifdef __FreeBSD__ -+ strcpy(buf, "/var/tmp"); -+ #else - strcpy(buf, "/usr/tmp"); -+ #endif - } - strcat(buf, "/m-prts-"); - p = getenv("USER"); *** unixpk.man.bak Fri Feb 17 00:39:50 1995 --- unixpk.man Mon Nov 11 10:19:46 1996 *************** diff --git a/converters/mpack/files/patch-ad b/converters/mpack/files/patch-ad new file mode 100644 index 000000000000..98cb3857ef6f --- /dev/null +++ b/converters/mpack/files/patch-ad @@ -0,0 +1,26 @@ +--- uudecode.c.orig Fri Feb 17 00:39:50 1995 ++++ uudecode.c Wed Aug 28 19:59:49 2002 +@@ -495,12 +495,12 @@ + */ + int + parseSubject(subject, fnamep, partp, npartsp) +-char *subject; ++unsigned char *subject; + char **fnamep; + int *partp; + int *npartsp; + { +- char *scan, *bak, *start; ++ unsigned char *scan, *bak, *start; + int part = -1, nparts = 0, hasdot = 0; + + /* No subject header */ +@@ -524,7 +524,7 @@ + * representation syntax + */ + do { +- while (*scan != '\n' && isprint(*scan) ++ while (*scan != '\n' + && !isalnum(*scan) && *scan != '_') ++scan; + *fnamep = start = scan; + while (isalnum(*scan) || *scan == '-' || *scan == '+' || *scan == '&' diff --git a/converters/mpack/files/patch-ae b/converters/mpack/files/patch-ae new file mode 100644 index 000000000000..7f156b4361a5 --- /dev/null +++ b/converters/mpack/files/patch-ae @@ -0,0 +1,46 @@ +--- unixos.c.orig Fri Feb 17 00:39:50 1995 ++++ unixos.c Wed Aug 28 19:56:07 2002 +@@ -80,7 +80,7 @@ + + /* Create and return directory for a message-id */ + char *os_idtodir(id) +-char *id; ++unsigned char *id; + { + static char buf[4096]; + char *p; +@@ -89,7 +89,11 @@ + strcpy(buf, getenv("TMPDIR")); + } + else { ++#ifdef __FreeBSD__ ++ strcpy(buf, "/var/tmp"); ++#else + strcpy(buf, "/usr/tmp"); ++#endif + } + strcat(buf, "/m-prts-"); + p = getenv("USER"); +@@ -144,7 +148,7 @@ + int flags; + params contentParams; + { +- char *p; ++ unsigned char *p; + static int filesuffix=0; + char buf[128], *descfname=0; + FILE *outfile = 0; +@@ -160,6 +164,13 @@ + /* Get rid of leading ~ or ~/ */ + while (*fname == '~' || *fname == '/') fname++; + ++ for (p=fname; *p; p += 3) { ++ if (!strncmp(p, "../", 3)) { ++ p[0] = p[1] = 'X'; ++ } else ++ break; ++ } ++ + /* Clean out bad characters, create directories along path */ + for (p=fname; *p; p++) { + if (*p == '/') { |