]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix core dump in dbus-message-internal
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2018 17:55:37 +0000 (09:55 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 30 Nov 2018 17:56:10 +0000 (09:56 -0800)
Backport from master.
* src/dbusbind.c (Fdbus_message_internal):
Don’t go past array end (Bug#33530).

src/dbusbind.c

index ec3707d18f31a707f2093acab1f5ce93c59fbe51..fe922d5429b3d1a66257dbfe6c1324ebaff19f47 100644 (file)
@@ -1419,7 +1419,7 @@ usage: (dbus-message-internal &rest REST)  */)
   for (; count < nargs; ++count)
     {
       dtype = XD_OBJECT_TO_DBUS_TYPE (args[count]);
-      if (XD_DBUS_TYPE_P (args[count]))
+      if (count + 1 < nargs && XD_DBUS_TYPE_P (args[count]))
        {
          XD_DEBUG_VALID_LISP_OBJECT_P (args[count]);
          XD_DEBUG_VALID_LISP_OBJECT_P (args[count+1]);