[Bash-completion-devel] [PATCH] Bug#559953: COMP_WORDS: bad array subscript

Igor Murzov e-mail at date.by
Fri Apr 29 09:39:30 UTC 2011


> This message also appears when you press tab with the cursor at the
> beginning of certain commands.
> To reproduce this write "dpkg" move cursor above "d" and hit tab, this one
> is specially annoying since message is repeated until you press ctrl-c
> This happens a lot to me when I use reverse-i-search (ctrl-r) and I press
> tab by mistake
> similar behavior with ls, cp, grep, ssh, man, uname, chown...

In this case $cword equals to zero and _init_completion tries to put 
${words[cword-1]} into prev, At this point out of bounds access occurs.


-- Igor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-out-of-bounds-access-to-COMP_WORDS.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20110429/4f4729bc/attachment.bin>


More information about the Bash-completion-devel mailing list