Subject: bug#20216

From: Austin Diviness <[email-masked]>
Date: Sun, 05 Jul 2015 14:22:59 -0700

I have attached a patch that fixes this bug for me, by checking that the
argument is indeed a function as an escape hatch for the while loop in
disassemble-internal. I branched from commit
5516728eac58aba87a39427b7a3d1bfb8e2a19d0 in order to make these changes.

Austin Diviness
From b7422d8cbd40ff3333aed1b909de044eacf800a4 Mon Sep 17 00:00:00 2001
From: Austin Diviness <[email-masked]>
Date: Sun, 5 Jul 2015 14:30:49 -0600
Subject: [PATCH] (Bug#20216): fixed infinite loop when trying to disassemble a
 non-function

---
 lisp/emacs-lisp/disass.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 15489fc..d2375df 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -77,7 +77,9 @@ redefine OBJECT if it is a symbol."
 	args)
     (while (symbolp obj)
       (setq name obj
-	    obj (symbol-function obj)))
+	    obj (symbol-function obj))
+      (if (not (fboundp name))
+          (error "Not a function")))
     (if (subrp obj)
 	(error "Can't disassemble #<subr %s>" name))
     (setq obj (autoload-do-load obj name))
-- 
2.1.3