Package: sensible-utils
Version: 0.0.9
Severity: minor
File: /usr/bin/select-editor
Hi,
It is possible to trigger an infinite loop in select-editor by doing
the following steps.
* Uninstall nano
* Run select-editor which stdin being /dev/null (or closed)
Fortunately, sensible-editor checks that stdin is a tty before trying
to run select-editor, so I suspect this is mostly a theoratical issue.
The issue in a nutshell:
"""
editors=`update-alternatives --list editor`
for e in $editors; do
i=`expr $i + 1`
desc=
if [ $e = "/bin/nano" ]; then
desc=" <---- ` gettext 'easiest'`"
** simple=$i
fi
echo " $i. $e$desc"
done
[...]
** while /bin/true; do
** if [ -z "$selected" -a ! -z "$simple" ]; then
** selected="$simple"
[...]
else
break
fi
done
"""
With "simple" always being unset/empty *unless* update-alternative
mentions "/bin/nano".
Thanks,
~Niels
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]