Bug 984430 - libopts crashes on range error
Summary: libopts crashes on range error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: autogen
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-15 08:32 UTC by Miroslav Lichvar
Modified: 2013-08-08 11:36 UTC (History)
1 user (show)

Fixed In Version: autogen-5.18-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-08 11:36:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Lichvar 2013-07-15 08:32:17 UTC
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):
autogen-libopts-5.12-5.fc20.x86_64

How reproducible:
always

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

Actual results:
crash

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 16:16:35 UTC
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.