Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 231146 - segmentation fault when %_rpmlock_path is not defined
Summary: segmentation fault when %_rpmlock_path is not defined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-06 15:12 UTC by Evgeny
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2007-0620
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 17:28:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0620 normal SHIPPED_LIVE rpm bug fix update 2007-10-30 16:04:09 UTC

Description Evgeny 2007-03-06 15:12:54 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rpm-4.4.2-37.el5

How reproducible:
remove %_rpmlock_path from macros. And try to remove package.

  
Actual results:
segmentation fault


Additional info:
from lib/rpmlock.c

            char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
            if (t == NULL || *t == '\0' || *t == '%')
                t = RPMLOCK_PATH;
            rpmlock_path = xstrdup(t);
            t = _free(t);

when macros rpmlock_path_default is not defined, t will be equal constant
RPMLOCK_PATH. Call free() for constant is not good idea.
as solution:
- t = RPMLOCK_PATH;
+ t = strdup(RPMLOCK_PATH);

Comment 1 Jeff Johnson 2007-03-08 13:19:33 UTC
Fixed in rpm-4.4.8 (at least).

UPSTREAM

Comment 3 RHEL Product and Program Management 2007-03-21 21:50:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Red Hat Bugzilla 2007-08-21 05:32:16 UTC
User pnasrat@redhat.com's account has been closed

Comment 8 errata-xmlrpc 2007-11-07 17:28:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0620.html



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