Bug 1082019 - IndexError when handler_name_pattern is composed only of "X" (lmi.shell.LMIIndicationListener)
Summary: IndexError when handler_name_pattern is composed only of "X" (lmi.shell.LMIIn...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openlmi-tools
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-28 13:43 UTC by Alois Mahdal
Modified: 2014-06-24 23:23 UTC (History)
4 users (show)

Fixed In Version: openlmi-tools-0.9.1-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-24 23:23:53 UTC
Type: Bug


Attachments (Terms of Use)

Description Alois Mahdal 2014-03-28 13:43:24 UTC
Description of problem:
When you provide only one or more "X" characters as handler_name_pattern when calling LMIIndicationListener.add_handler, IndexError("string index out of range") is raised from LMIIndicationListener.__create_handler_name


Version-Release number of selected component (if applicable):
openlmi-tools-0.9-16.fc20.noarch

How reproducible:
Always

Steps to Reproduce:
1. l = LMIIndicationListener(...)
2. l.handler("XX", ...)

Actual results:
IndexError("string index out of range")

Expected results:
If at least 8 "X" characters are given, unique name should be returned.
Otherwise, LMIHandlerNamePatternError should be raised.


Additional info:

In the offending code:

    while handler_name_pattern[pattern_len - 1 - x_cnt] == "X":
        x_cnt += 1

index is eventually -1.

Comment 1 Alois Mahdal 2014-03-28 13:47:28 UTC
Patch posted for review:

https://reviewboard-openlmi.rhcloud.com/r/1567/

Comment 2 Fedora Update System 2014-04-16 14:03:26 UTC
openlmi-tools-0.9.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openlmi-tools-0.9.1-1.fc20

Comment 3 Fedora Update System 2014-04-18 15:43:31 UTC
Package openlmi-tools-0.9.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openlmi-tools-0.9.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5351/openlmi-tools-0.9.1-1.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-04-29 13:55:58 UTC
openlmi-tools-0.9.1-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openlmi-tools-0.9.1-2.fc20

Comment 5 Fedora Update System 2014-05-15 07:45:20 UTC
openlmi-tools-0.9.1-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openlmi-tools-0.9.1-3.fc20

Comment 6 Fedora Update System 2014-06-24 23:23:53 UTC
openlmi-tools-0.9.1-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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