diff options
author | Robert Buchholz <rbu@gentoo.org> | 2008-07-28 00:35:38 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2008-07-28 00:35:38 +0000 |
commit | 4989b6f34b1140f5b63f5d7c6ff336aefa63d43b (patch) | |
tree | 84f73b26fdedb35714af1336eee44058e656147b /app-text/uudeview/files/uudeview-0.5.20-rename.patch | |
parent | version bump (diff) | |
download | gentoo-2-4989b6f34b1140f5b63f5d7c6ff336aefa63d43b.tar.gz gentoo-2-4989b6f34b1140f5b63f5d7c6ff336aefa63d43b.tar.bz2 gentoo-2-4989b6f34b1140f5b63f5d7c6ff336aefa63d43b.zip |
Non-maintainer bump
Pull in source patches from Debian
* Fix temporary file issue (CVE-2004-2265, CVE-2008-2266, bug #222275)
* Update uudeview man page, include uuwish man page
* Several bug fixes
Other changes:
* Remove dead 'debug' use flag
* Remove old patch
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-text/uudeview/files/uudeview-0.5.20-rename.patch')
-rw-r--r-- | app-text/uudeview/files/uudeview-0.5.20-rename.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/app-text/uudeview/files/uudeview-0.5.20-rename.patch b/app-text/uudeview/files/uudeview-0.5.20-rename.patch new file mode 100644 index 000000000000..c62c64c70eb3 --- /dev/null +++ b/app-text/uudeview/files/uudeview-0.5.20-rename.patch @@ -0,0 +1,57 @@ ++uudeview (0.5.19+beta20030413-1) unstable; urgency=low +... ++ * Use rename() in preference to copy if possible. ++ (closes: Bug#166040) +... ++ -- Chris Hanson <cph@debian.org> Sun, 7 Sep 2003 01:05:07 -0400 + +Index: uudeview-0.5.20/uulib/uulib.c +=================================================================== +--- uudeview-0.5.20.orig/uulib/uulib.c ++++ uudeview-0.5.20/uulib/uulib.c +@@ -872,7 +872,10 @@ UUDecodeToTemp (uulist *thefile) + } + + /* +- * decode file first to temp file, then copy it to a final location ++ * Decode file first to temp file, then copy it to a final location. ++ * A move is preferable to a copy. If the file is on the same ++ * partition, no copy is performed. This is important for large ++ * files. + */ + + int UUEXPORT +@@ -978,6 +981,12 @@ UUDecodeFile (uulist *thefile, char *des + return UURET_IOERR; + } + ++ if (rename(thefile->binfile, uugen_fnbuffer) == 0) { ++ fclose(source); ++ close(fildes); ++ goto finish_ok; ++ } ++ + if ((target = fdopen (fildes, "wb")) == NULL) { + progress.action = 0; + UUMessage (uulib_id, __LINE__, UUMSG_ERROR, +@@ -1042,6 +1051,8 @@ UUDecodeFile (uulist *thefile, char *des + thefile->binfile, + strerror (uu_errno = errno)); + } ++ ++ finish_ok: + _FP_free (thefile->binfile); + thefile->binfile = NULL; + thefile->state &= ~UUFILE_TMPFILE; +@@ -1103,9 +1114,9 @@ UUInfoFile (uulist *thefile, void *opaqu + + while (!feof (inpfile) && + (uu_fast_scanning || ftell(inpfile) < maxpos)) { +- if (_FP_fgets (uugen_inbuffer, 511, inpfile) == NULL) ++ if (_FP_fgets (uugen_inbuffer, 1023, inpfile) == NULL) + break; +- uugen_inbuffer[511] = '\0'; ++ uugen_inbuffer[1023] = '\0'; + + if (ferror (inpfile)) + break; |