Bug 456666 - msghack doesn't check for mandatory cmd line params
msghack doesn't check for mandatory cmd line params
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gettext (Show other bugs)
10
All Linux
medium Severity low
: ---
: ---
Assigned To: Ding-Yi Chen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-25 09:30 EDT by Milos Malik
Modified: 2009-01-28 20:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-28 20:07:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2008-07-25 09:30:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080715 Fedora/2.0.0.16-1.fc8 Firefox/2.0.0.16

Description of problem:
msghack does not check if mandatory command line parameters are present. This behavior leads to various tracebacks.



Version-Release number of selected component (if applicable):
gettext-0.16.1-12.fc8

How reproducible:
Always


Steps to Reproduce:
$ msghack -o
Traceback (most recent call last):
  File "/usr/bin/msghack", line 351, in <module>
    output=sys.argv[sys.argv.index("-o")+1]
IndexError: list index out of range
$ msghack --invert
Traceback (most recent call last):
  File "/usr/bin/msghack", line 355, in <module>
    file=sys.argv[sys.argv.index("--invert")+1]
IndexError: list index out of range
$ msghack --master
Traceback (most recent call last):
  File "/usr/bin/msghack", line 371, in <module>
    master=GTMaster(gtfs)
  File "/usr/bin/msghack", line 315, in __init__
    self.createMaster(dicts)
  File "/usr/bin/msghack", line 324, in createMaster
    self._master=dicts[0]
IndexError: list index out of range
$ msghack --empty
Traceback (most recent call last):
  File "/usr/bin/msghack", line 363, in <module>
    file=sys.argv[sys.argv.index("--empty")+1]
IndexError: list index out of range
$ msghack --append
Traceback (most recent call last):
  File "/usr/bin/msghack", line 374, in <module>
    file=sys.argv[sys.argv.index("--append")+1]
IndexError: list index out of range


Actual Results:
The utility exits with a traceback.

Expected Results:
The utility exits without traceback (it can display the usage message).

Additional info:
Comment 3 Jens Petersen 2008-07-31 04:14:13 EDT
Ding, do you mind taking a look at this, please.
Comment 4 Tony Fu 2008-09-09 23:12:36 EDT
requested by Jens Petersen (#27995)
Comment 5 Bug Zapper 2008-11-25 21:36:01 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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