Bug 231146
| Summary: | segmentation fault when %_rpmlock_path is not defined | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Evgeny <evgsw> |
| Component: | rpm | Assignee: | Peter Jones <pjones> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | RHBA-2007-0620 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-11-07 17: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: | |||
Fixed in rpm-4.4.8 (at least). UPSTREAM 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. User pnasrat's account has been closed 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 |
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);