+Wed Oct 13 20:41:16 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
+
+ * Update oldfile-check in process_archive so we don't experience
+ memory corruption
+
Wed Oct 13 17:51:17 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Merge patches from Ben Collins <bcollins@debian.org>:
fnnf_no_atomic_overwrite= 000020, /* >=1 instance is a dir, cannot rename over */
} flags; /* Set to zero when a new node is created. */
const char *oldhash; /* valid iff this namenode is in the newconffiles list */
- struct stat *stat;
};
struct fileinlist {
upgrade/downgrade", fnamevb.buf);
if (!lstat(fnamevb.buf, &oldfs) && !S_ISDIR(oldfs.st_mode)) {
for (cfile = newfileslist; cfile; cfile = cfile->next) {
- if(!cfile->namenode->stat) {
- newfs = nfmalloc(sizeof(struct stat));
- if (lstat(cfile->namenode->name, newfs)) continue;
- cfile->namenode->stat = newfs;
- } else newfs = cfile->namenode->stat;
- if (!S_ISDIR(newfs->st_mode) && oldfs.st_dev == newfs->st_dev &&
- oldfs.st_ino == newfs->st_ino) {
+ if (lstat(cfile->namenode->name, &newfs) || S_ISDIR(newfs.st_mode))
+ continue;
+ if (oldfs.st_dev == newfs.st_dev &&
+ oldfs.st_ino == newfs.st_ino) {
donotrm = 1;
debug(dbg_eachfile, "process_archive: not removing %s, since it matches %s",
fnamevb.buf, cfile->namenode->name);