Bug 553624 - option parsing of --get incorrect
Summary: option parsing of --get incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: patch
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: Ondrej Moriš
URL:
Whiteboard:
Depends On:
Blocks: 616003 618216
TreeView+ depends on / blocked
 
Reported: 2010-01-08 13:11 UTC by Martin Poole
Modified: 2018-10-27 12:21 UTC (History)
4 users (show)

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.
Clone Of:
: 616003 618216 (view as bug list)
Environment:
Last Closed: 2010-08-25 14:18:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0656 0 normal SHIPPED_LIVE patch bug fix update 2010-08-25 14:18:21 UTC

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


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