Incorrect .clicompanion2 file causes the program to crash

Bug #910360 reported by David Caro
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Low
Unassigned

Bug Description

With an empty line or a bad formatted command in the .clicompanion2 command file, the program crashes, for example:

  1 perl Test::Class
  2 ls -l\tffff
  3 ls -a\t\tprueba6s
  4 ls ? ?\tprueba tt\tdddfdf
  5 rtrte\t\t
  6

$ ./clicompanion
Using locale in system
Traceback (most recent call last):
  File "./clicompanion", line 65, in <module>
    run()
  File "/home/cascara/Programacion/clicompanion/clicompanion/clicompanionlib/view.py", line 545, in run
    main_window = MainWindow()
  File "/home/cascara/Programacion/clicompanion/clicompanion/clicompanionlib/view.py", line 235, in __init__
    self.setup()
  File "/home/cascara/Programacion/clicompanion/clicompanion/clicompanionlib/view.py", line 151, in setup
    cheatlines.append(str(l[0] + "\t"+ l[1] +"\t"+ l[2] + "\n"))
IndexError: list index out of range

Related branches

Revision history for this message
David Caro (dcaro) wrote :
David Caro (dcaro)
Changed in clicompanion:
status: Confirmed → Fix Committed
David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.