michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame SOURCES/rpm-4.13.x-fix-segfault-on-fingerprint-symlink.patch

5523e9
--- rpm-4.11.3/lib/fprint.c.old	2014-02-05 14:04:01.000000000 +0100
5523e9
+++ rpm-4.11.3/lib/fprint.c	2019-08-21 16:28:03.255538275 +0200
5523e9
@@ -484,7 +484,7 @@
5523e9
 	(void) rpmdbCheckSignals();
5523e9
 
5523e9
 	if ((fi = rpmteFI(p)) == NULL)
5523e9
-	    continue;	/* XXX can't happen */
5523e9
+	    continue;
5523e9
 
5523e9
 	(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);
5523e9
 	rpmfiFpLookup(fi, fpc);
5523e9
@@ -518,6 +518,9 @@
5523e9
     while ((p = rpmtsiNext(pi, 0)) != NULL) {
5523e9
 	(void) rpmdbCheckSignals();
5523e9
 
5523e9
+	if ((fi = rpmteFI(p)) == NULL)
5523e9
+	    continue;
5523e9
+
5523e9
 	fs = rpmteGetFileStates(p);
5523e9
 	fc = rpmfsFC(fs);
5523e9
 	(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);