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

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

bug#6378: all-completions Segfault


From: Juanma Barranquero
Subject: bug#6378: all-completions Segfault
Date: Tue, 8 Jun 2010 18:41:07 +0200

On Tue, Jun 8, 2010 at 17:46, Nathan Weizenbaum <nex342@gmail.com> wrote:

>   (all-completions "" [])
>
> I think the problem is on line 1593 of src/minibuf.c, but my
> Emacs-innards-fu isn't good enough to attempt a fix.

minibuf.c:1617, at this code:

              if (XSYMBOL (bucket)->next)

because bucket has been assigned random junk from the nonexistent item
at position 0 in COLLECTION.

It should be fixed with the attached patch.

    Juanma


2010-06-08  Juanma Barranquero  <lekktu@gmail.com>

        * minibuf.c (Fall_completions): Check COLLECTION's size.  (Bug#6378)


=== modified file 'src/minibuf.c'
--- src/minibuf.c       2010-01-13 08:35:10 +0000
+++ src/minibuf.c       2010-06-08 16:34:41 +0000
@@ -1591,5 +1591,5 @@
     {
       obsize = XVECTOR (collection)->size;
-      bucket = XVECTOR (collection)->contents[index];
+      bucket = obsize ? XVECTOR (collection)->contents[index] : zero;
     }





reply via email to

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