Bug 984430 - libopts crashes on range error
libopts crashes on range error
Product: Fedora
Classification: Fedora
Component: autogen (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-15 04:32 EDT by Miroslav Lichvar
Modified: 2013-08-08 07:36 EDT (History)
1 user (show)

See Also:
Fixed In Version: autogen-5.18-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-08 07:36:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Miroslav Lichvar 2013-07-15 04:32:17 EDT
Description of problem:
When a numeric autoopts option with specified minimum/maximum is used with a wrong value, the optionShowRange function crashes.

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

How reproducible:

Steps to Reproduce:
1. install ntp
2. run ntp-keygen -m 1

Actual results:

Expected results:
ntp-keygen error:  modulus option value 1 is out of range.
It must be in the range:
        256 to 2048

Additional info:
It seems to be fixed in newer autogen releases. The relevant patch is:

--- autoopts/usage-txt.h.optsrange     2011-05-16 06:14:36.000000000 +0200
+++ autoopts/usage-txt.h       2013-07-12 18:15:36.122764517 +0200
@@ -331,7 +331,7 @@ static char const usage_txt[4435] =
     "%sIt must lie in one of the ranges:\n\0"
     "%sIt must be in the range:\n\0"
     ", or\n\0"
-    "%s error:  %s option value ``%s'' is out of range.\n\0"
+    "%s error:  %s option value %ld is out of range.\n\0"
     "%s%ld exactly\0"
     "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
     "%sless than or equal to %ld\0"
Comment 1 Fedora Admin XMLRPC Client 2013-08-07 12:16:35 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

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