emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: crash with invalid image map element


From: Kim F. Storm
Subject: Re: crash with invalid image map element
Date: Mon, 15 Nov 2004 16:24:36 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

[[Handa-san, please read note below.]]


SAITO Takuya <address@hidden> writes:

> Start emacs -Q, and evaluate below:
>
> (insert-image
>  (create-image
>   "splash.xpm" nil nil
>   :map (list (list
>               (cons 'rect (cons (cons 0 0) (cons 300 300)))
>               'id
>               (list 'help-echo "id")))))
>
> Then, emacs crashes if I move my mouse over the rectangle area.

I just installed changes to fix this.

The fix involves defining a new function safe-plist-get
(Fsafe_plist_get) that is safe to use at low-level, i.e. that it
doesn't signal any errors for malformed plists.

I think other C-level code should use this  (see the following
comment in the source for Fplist_get):


      /* This function can be called asynchronously
         (setup_coding_system).  Don't QUIT in that case.  */
      if (!interrupt_input_blocked)
        QUIT;


Probably the relevant callers should use Fsafe_plist_get instead.


>
> lookup-image-map's docstring and NEWS says that
> image map's format is (AREA ID PLIST),
> but isn't it (AREA ID . PLIST) ?

I fixed this too.

--
Kim F. Storm  http://www.cua.dk





reply via email to

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