Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 553624

Summary: option parsing of --get incorrect
Product: Red Hat Enterprise Linux 5 Reporter: Martin Poole <mpoole>
Component: patchAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: ebenes, omoris, pknirsch, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: patch-2.5.4-30.el5 Doc Type: Bug Fix
Doc Text:
The "-g" option was not handled correctly by the patch command. This has been fixed.
Story Points: ---
Clone Of:
: 616003 618216 (view as bug list) Environment:
Last Closed: 2010-08-25 14:18:29 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:
Bug Depends On:    
Bug Blocks: 616003, 618216    

Description Martin Poole 2010-01-08 13:11:19 UTC
Description of problem:

the long option parsing for the -g --get option incorrectly states it take no parameter.

Version-Release number of selected component (if applicable):

patch-2.5.4-29.2.3.el5

How reproducible:

always

Steps to Reproduce:
1. patch --get 1
2.
3.
  
Actual results:

$ patch --get
Segmentation fault

$ patch --get 1
Segmentation fault

Expected results:

$ patch --get
patch: option `--get' requires an argument
patch: Try `./patch-2.5.4/patch --help' for more information.

Additional info:

The fix is simply to change the parameter option for 'get' in the longopts in patch.c from no_argument to required_argument.

This bug is also present in the current upstream source.

Comment 8 Tim Waugh 2010-08-06 16:49:06 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
The "-g" option was not handled correctly by the patch command.  This has been fixed.

Comment 12 errata-xmlrpc 2010-08-25 14:18:29 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 therefore 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-2010-0656.html