'' causes a backtrack

Bug #105228 reported by Daniel Janus
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
command-not-found
Fix Released
Medium
Unassigned
command-not-found (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Enter '' (that's single quote, single quote, enter) in bash. The following output is produced.

nathell@localhost:~$ ''
Traceback (most recent call last):
  File "/usr/bin/command-not-found", line 22, in ?
    if not CommandNotFound(options.data_dir).advise(args[0]):
  File "/usr/lib/python2.4/site-packages/CommandNotFound/CommandNotFound.py", line 119, in advise
    suggestions = self.getSuggestions(command)
  File "/usr/lib/python2.4/site-packages/CommandNotFound/CommandNotFound.py", line 104, in getSuggestions
    result.extend(db.lookup(command))
  File "/usr/lib/python2.4/site-packages/CommandNotFound/CommandNotFound.py", line 87, in lookup
    return [ Suggestion(row[self.TEXT], magicSplit(row[self.PROGRAMS], ",")) for row in self.db.lookup(self.COMMAND, command) ]
IndexError: list index out of range
-bash: : command not found

The last line is correct, but the backtrack should not be visible.

Occurs both in trunk and version from Edgy.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Indeed occurs on edgy. Fixed in feisty.

Changed in command-not-found:
status: Unconfirmed → Confirmed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Fixed in trunk while removing support for suggestions.
Suggestions will return as a feature one day.

Changed in command-not-found:
importance: Undecided → Medium
status: Unconfirmed → Fix Released
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

As consulted with mvo, olny high priority or critical bugs are fixed in -updates.

Changed in command-not-found:
importance: Undecided → Medium
status: Confirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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