Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > media > main-updates-src > by-pkgid > 2e20fbe220a1d0f48a15d5008a7dd680 > files > 29

rpm-4.4.6-22.1mdv2007.1.src.rpm

--- rpm-4.4.6/lib/fsm.c.pix	2006-03-30 23:47:48.000000000 +0200
+++ rpm-4.4.6/lib/fsm.c	2006-11-27 15:57:43.000000000 +0100
@@ -2176,7 +2181,9 @@
 		rc = fsmUNSAFE(fsm, FSM_READLINK);
 		errno = saveerrno;
 		if (rc) break;
-		if (!strcmp(fsm->opath, fsm->rdbuf))	return 0;
+		/* [PIX] fsm->opath can be NULL, and what we really want is lpath, no? */
+		if (!strcmp(fsm->opath ? fsm->opath : fsm->lpath, fsm->rdbuf))	return 0;
+		/* here the link is wrong, we will overwrite existing file */
 	    }
 	} else if (S_ISFIFO(st->st_mode)) {
 	    if (S_ISFIFO(ost->st_mode))		return 0;