Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196392 - app-misc/wipe-2.2.20050509 (2.2.0 crash on wipe file with full path)
Summary: app-misc/wipe-2.2.20050509 (2.2.0 crash on wipe file with full path)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 69633
  Show dependency tree
 
Reported: 2007-10-19 09:19 UTC by Sergey Pushilin
Modified: 2007-12-07 17:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Pushilin 2007-10-19 09:19:08 UTC
wipecrash if wipe file with full path
i resolved bug. Please include this patch to ebuild.

diff -urN wipe-2.2.0/dir.c wipe-2.2.0-p/dir.c
--- wipe-2.2.0/dir.c    2003-08-04 02:59:00.000000000 +0400
+++ wipe-2.2.0-p/dir.c  2007-10-18 13:39:58.000000000 +0400
@@ -185,7 +185,7 @@
 {
   DIR *dir;
   int i, fd;
-  size_t len, pathlen;
+  size_t len, pathlen, fnlen;
   char *base, dest_name[PATH_MAX+1];

 #ifdef SANITY
@@ -242,6 +242,7 @@
     but not longer than PATH_MAX.
   */

+  fnlen=rnlen-pathlen;
   len = pathlen + rnlen;
   if (len > PATH_MAX)
     rnlen -= len - PATH_MAX;
@@ -254,7 +255,7 @@
   i=0;
   while (!i)
     {
-      rename_str(base, rnlen);
+      rename_str(base, fnlen);
       i = access(dest_name, F_OK);
     }


Reproducible: Always

Steps to Reproduce:
touch /tmp/file; wipe /tmp/file
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 09:21:01 UTC
Try w/ 2.2.20050509 please.
Comment 2 Sergey Pushilin 2007-10-19 10:38:36 UTC
(In reply to comment #1)
> Try w/ 2.2.20050509 please.
i did not this bug in new version
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 10:40:31 UTC
Well, then lets stabilize it and be done with it. :)
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 10:41:11 UTC
arches, please stabilize app-misc/wipe-2.2.20050509 (see Bug 69633).
Comment 5 Jurek Bartuszek (RETIRED) gentoo-dev 2007-10-20 22:10:29 UTC
x86 stable
Comment 6 Raúl Porcel (RETIRED) gentoo-dev 2007-11-05 16:31:57 UTC
sparc stable
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2007-11-28 20:17:12 UTC
amd64 stable
Comment 8 Tobias Scherbaum (RETIRED) gentoo-dev 2007-12-07 17:00:23 UTC
ppc stable and closing