Package: sensible-utils
Version: 0.0.6
Followup-For: Bug #390580

I experienced the consequences of this bug today, more than four years after it
got reported. Perhaps something like the attached patch might help?

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=POSIX, LC_CTYPE=de_AT.utf-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- no debconf information

-- 
time flies like an arrow, fruit flies like a banana
--- /usr/bin/sensible-editor	2010-11-26 00:40:18.000000000 +0000
+++ sensible-editor	2011-03-21 06:57:36.292643666 +0000
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if [[ $0 == *sensible-editor ]]; then
+  echo -e "Please DO NOT set the \$EDITOR environment variable to \"$0\",\nfor it will call this script in an endless loop and your system might \nrun out of resources." 1>&2
+  exit 1
+fi
+
 ret="$?"
 
 if [ -n "$VISUAL" ]; then

Reply via email to