From: Paul Eggert Date: Fri, 30 Nov 2018 17:55:37 +0000 (-0800) Subject: Fix core dump in dbus-message-internal X-Git-Tag: emacs-26.1.91~70 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ecf49b5a5741cc4a895c8ff42bbb4577659192c;p=emacs.git Fix core dump in dbus-message-internal Backport from master. * src/dbusbind.c (Fdbus_message_internal): Don’t go past array end (Bug#33530). --- diff --git a/src/dbusbind.c b/src/dbusbind.c index ec3707d18f3..fe922d5429b 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -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]);