erbot-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erbot-discuss] Limiting length of lists for user functions


From: Michael Olson
Subject: [Erbot-discuss] Limiting length of lists for user functions
Date: Fri, 04 Nov 2005 02:11:02 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

One of the users of my bot instance found a way to crash Emacs 22 with
a user-defined function.

(defun fs-boom
  (fs-l)
  (sit-for 0)
  (fs-boom
   (fs-concatenate 'list fs-l fs-l fs-l fs-l fs-l fs-l fs-l)))

Input: boom (list 1 1)

For now, I've disabled fsi-concatenate and fsi-nreconc in the bot's
.emacs, but I think a more general solution is needed.

I can see two solutions so far, both of which involve modifying
erblist-sandbox.

 1. Prohibit (or limit) recursion, perhaps by something like
    (add-to-list erblisp-executed functions 'fs-current-fun)

 2. Limit the length of each argument to some configurable value

Any other ideas?

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: anime, Debian, XHTML, wiki, Emacs Lisp
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
 |_] | \| |_| Jabber: mwolson_at_hcoop.net

Attachment: pgpzfZrre9ZFm.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]