emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against in


From: Chong Yidong
Subject: Re: /srv/bzr/emacs/trunk r107337: Protect fileio.c primitives against invalid file handler return values.
Date: Mon, 20 Feb 2012 10:02:18 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Leo <address@hidden> writes:

> Thank you for fixing the crash.
>
> On 2012-02-19 17:58 +0800, Chong Yidong wrote:
>> +      error ("Invalid handler in `file-name-handler-alist'");
>
> By looking at the doc-string of file-name-handler-alist, it seems
> '("asdf" . ignore) is perfectly legitimate. Why is it invalid?

This is explained in more detail in (elisp)Magic File Names:

  The handler function must handle all of the above operations, and
  possibly others to be added in the future.  It need not implement all
  these operations itself--when it has nothing special to do for a
  certain operation, it can reinvoke the primitive, to handle the
  operation "in the usual way."  It should always reinvoke the primitive
  for an operation it does not recognize.

If the handler function returns an object of the wrong type, and that is
not caught, Emacs is liable to crash if that return value is used in C
code.



reply via email to

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