Bug 43139

Summary: "rpm -q -i -p ftp://<whatever>" coredumps
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <jik>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-01 08:28:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Kamens 2001-06-01 08:28:20 UTC
In rpm-4.0.3-0.29, if you run "rpm -q -i -p" and specify an ftp://... URL,
it'll core-dump.

As far as I can tell, this is the correct fix to this problem.  I have no
idea why the code that is removed by this fix was there in the first
place.  Perhaps it's debugging code that someone forgot to remove.  With
this code in place, uCache can never be initialized, because urlFind always
returnes upon discovering that it hasn't been initialized yet.

--- rpmio/url.c.orig	Fri Jun  1 04:25:25 2001
+++ rpmio/url.c	Fri Jun  1 04:28:03 2001
@@ -176,11 +176,6 @@
     if (uret == NULL)
 	return;
 
-    if (uCache == NULL) {
-	*uret = NULL;
-	return;
-    }
-
     u = *uret;
     URLSANE(u);

Comment 1 Jeff Johnson 2001-06-01 20:54:44 UTC
Not debugging, tedious wrestling with lclint output, as rpm is now lclint clean.

Better (and functional) fix to shut up lclint in rpm-4.0.3-0.31. Thanks for
noticing.