[BusyBox-cvs] busybox/archival tar.c,1.169,1.170
Glenn McGrath
bug1 at busybox.net
Mon Apr 21 10:07:52 UTC 2003
- Previous message: [BusyBox-cvs] busybox/docs/busybox.net index.html,1.118,1.119
- Next message: [BusyBox-cvs] busybox/debian changelog,1.35,1.36 config-net-udeb-i386,1.2,1.3 config-udeb,1.12,1.13 config-udeb-i386,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/archival
In directory winder:/tmp/cvs-serv14148/archival
Modified Files:
tar.c
Log Message:
unlink() an existing file, before opening it, simply truncating can
cause nasty problems if overwriting glibc, spotted by waldi.
Index: tar.c
===================================================================
RCS file: /var/cvs/busybox/archival/tar.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- tar.c 19 Mar 2003 09:11:22 -0000 1.169
+++ tar.c 21 Apr 2003 10:07:48 -0000 1.170
@@ -472,7 +472,8 @@
tbInfo.tarFd = fileno(stdout);
tbInfo.verboseFlag = verboseFlag ? 2 : 0;
} else {
- tbInfo.tarFd = open(tarName, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ unlink(tarName);
+ tbInfo.tarFd = open(tarName, O_WRONLY | O_CREAT | O_EXCL, 0644);
tbInfo.verboseFlag = verboseFlag ? 1 : 0;
}
- Previous message: [BusyBox-cvs] busybox/docs/busybox.net index.html,1.118,1.119
- Next message: [BusyBox-cvs] busybox/debian changelog,1.35,1.36 config-net-udeb-i386,1.2,1.3 config-udeb,1.12,1.13 config-udeb-i386,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list