--- 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;