Bug 43139 - "rpm -q -i -p ftp://<whatever>" coredumps
Summary: "rpm -q -i -p ftp://<whatever>" coredumps
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-06-01 08:28 UTC by Jonathan Kamens
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-06-01 08:28:24 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.