[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] bug#1031: tar can unlink files
From: David Vrabel <dvrabel () arcom ! co ! uk>
Date: 2000-08-25 9:37:58
[Download RAW message or body]
Package: busybox
Version: 0.46
Severity: critical
When extracting files to standard output any files matching the archive
contents are unlink()ed.
Suggested fix: check that tostdOut == FALSE before unlink()ing. (find a
patch attached)
David Vrabel
["patch" (text/plain)]
--- tar.c.orig Thu Aug 24 16:32:03 2000
+++ tar.c.unlinkfixed Fri Aug 25 10:35:59 2000
@@ -649,9 +649,10 @@
printf("\n");
}
- /* Remove any clutter lying in our way */
- if (extractFlag == TRUE) /* .. but only if we are extracting (as */
- unlink( header.name); /* opposed to listing) (rob@sysgo.de) */
+ /* Remove files if we would overwrite them */
+ if (extractFlag == TRUE && tostdOut == FALSE) {
+ unlink( header.name);
+ }
/* If we got here, we can be certain we have a legitimate
* header to work with. So work with it. */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic