diff options
author | ache <ache@FreeBSD.org> | 2002-08-28 16:07:33 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2002-08-28 16:07:33 +0000 |
commit | f1efdb00a07a45525d510290be7051cee466b157 (patch) | |
tree | 656a7438ad1f4cc181bbfcdf62e5c8bf413d79ef /converters | |
parent | 31751564ae2c6e05987dbb226466cd996618e8bb (diff) | |
download | FreeBSD-ports-f1efdb00a07a45525d510290be7051cee466b157.zip FreeBSD-ports-f1efdb00a07a45525d510290be7051cee466b157.tar.gz |
Better control filenames validity, ctype fixes
Diffstat (limited to 'converters')
-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 81754ba..cd9a647 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 0000000..98cb385 --- /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 0000000..7f156b4 --- /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 == '/') { |