Patch to defeat uudeview "UNKNOWN" filenames. Problem introduced with 0.5.19 Problem remains in 0.5.20 Index: uuscan.c --- uulib/uuscan.c.orig 2004-03-12 11:47:13.000000000 +0100 +++ uulib/uuscan.c 2004-03-12 13:37:54.000000000 +0100 @@ -1604,20 +1604,23 @@ } /* skip empty lines */ - prevpos = ftell (datei); + { + long localprevpos; + localprevpos = ftell (datei); if (IsLineEmpty (line)) { while (!feof (datei)) { if (_FP_fgets (line, 255, datei) == NULL) break; if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL(); if (!IsLineEmpty (line)) { - fseek (datei, prevpos, SEEK_SET); + fseek (datei, localprevpos, SEEK_SET); line[255] = '\0'; break; } - prevpos = ftell (datei); + localprevpos = ftell (datei); } } + } /* * If we don't have all valid MIME headers yet, but the following mkstemp security enhancement. Similar to FreeBSD http://www.freebsd.org/cgi/query-pr.cgi?pr=41508 SuSE uudeview-0.5.18-244.src.rpm --- unix/uudeview.c +++ unix/uudeview.c @@ -434,7 +434,7 @@ return 0; } - if ((stdfile = tempnam (NULL, "uu")) == NULL) { + if ((stdfile = _FP_tempnam (NULL, "uu")) == NULL) { fprintf (stderr, "proc_stdin: cannot get temporary file\n"); return 0; } --- uulib/fptools.c +++ uulib/fptools.c @@ -507,5 +507,15 @@ char * TOOLEXPORT _FP_tempnam (char *dir, char *pfx) { - return _FP_strdup (tmpnam (NULL)); + int fd; + char fileName[100]; + + strncpy(fileName, pfx, 90); + strcat(fileName, "XXXXXX"); + fd = mkstemp(fileName); + if (fd == -1) + return NULL; + close(fd); + unlink(fileName); + return _FP_strdup (fileName); } --- uulib/uunconc.c +++ uulib/uunconc.c @@ -1264,7 +1264,7 @@ else mode = "wb"; /* otherwise in binary */ - if ((data->binfile = tempnam (NULL, "uu")) == NULL) { + if ((data->binfile = _FP_tempnam (NULL, "uu")) == NULL) { UUMessage (uunconc_id, __LINE__, UUMSG_ERROR, uustring (S_NO_TEMP_NAME)); return UURET_NOMEM; @@ -1426,7 +1426,7 @@ */ if (data->uudet == BH_ENCODED && data->binfile) { - if ((ntmp = tempnam (NULL, "uu")) == NULL) { + if ((ntmp = _FP_tempnam (NULL, "uu")) == NULL) { UUMessage (uunconc_id, __LINE__, UUMSG_ERROR, uustring (S_NO_TEMP_NAME)); progress.action = 0;