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 3 product line. The current stable release is 3.9. 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 137660

Summary: ypserv segfaults when used with -p portnum
Product: Red Hat Enterprise Linux 3 Reporter: Ion Badulescu <ionut>
Component: ypservAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: cfeist, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-21 20:23:43 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:

Description Ion Badulescu 2004-10-30 07:52:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041003
Firefox/0.10

Description of problem:
One of the changes in ypserv-2.8-iface-binding3.patch contains a
typo/thinko:

-      c = getopt_long (argc, argv, "vdp:buh", long_options,
&option_index);
+      c = getopt_long (argc, argv, "vdpi:buh", long_options,
&option_index);

Since "p" loses the colon after it, it no longer requires an argument,
so eventually atoi() ends up being called with a NULL argument.

The fix is obvious, is tested, and it solves the problem.

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

How reproducible:
Always

Steps to Reproduce:
1. ypserv -p 920
2.
3.
    

Actual Results:  # ypserv -p911
Segmentation fault


Additional info:

Comment 1 Chris Feist 2004-11-03 17:04:28 UTC
Bug was verified, and has been fixed in ypserv-2.8-11.

Comment 2 John Flanagan 2004-12-21 20:23:43 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-2004-578.html