aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorStephen Leake2019-09-10 03:37:51 -0700
committerStephen Leake2019-09-10 03:37:51 -0700
commit3d442312889ef2d14c07282d0aff6199d00cc165 (patch)
tree74034ca2dded6ed233d0701b4cb5c10a0b5e9034 /src/dbusbind.c
parentac1a2e260e8ece34500b5879f766b4e54ee57b94 (diff)
parent74e9799bd89484b8d15bdd6597c68fc00d07e7f7 (diff)
downloademacs-3d442312889ef2d14c07282d0aff6199d00cc165.tar.gz
emacs-3d442312889ef2d14c07282d0aff6199d00cc165.zip
Merge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 90ba461c6bc..7f4c8717f42 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -728,22 +728,27 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
728 strcpy (signature, DBUS_TYPE_STRING_AS_STRING); 728 strcpy (signature, DBUS_TYPE_STRING_AS_STRING);
729 729
730 else 730 else
731 /* If the element type is DBUS_TYPE_SIGNATURE, and this is 731 {
732 the only element, the value of this element is used as 732 /* If the element type is DBUS_TYPE_SIGNATURE, and this is
733 the array's element signature. */ 733 the only element, the value of this element is used as
734 if ((XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (object)) 734 the array's element signature. */
735 == DBUS_TYPE_SIGNATURE) 735 if (CONSP (object) && (XD_OBJECT_TO_DBUS_TYPE (XCAR (object))
736 && STRINGP (CAR_SAFE (XD_NEXT_VALUE (object))) 736 == DBUS_TYPE_SIGNATURE))
737 && NILP (CDR_SAFE (XD_NEXT_VALUE (object)))) 737 {
738 { 738 Lisp_Object val = XD_NEXT_VALUE (object);
739 lispstpcpy (signature, CAR_SAFE (XD_NEXT_VALUE (object))); 739 if (CONSP (val) && STRINGP (XCAR (val)) && NILP (XCDR (val))
740 object = CDR_SAFE (XD_NEXT_VALUE (object)); 740 && SBYTES (XCAR (val)) < DBUS_MAXIMUM_SIGNATURE_LENGTH)
741 } 741 {
742 742 lispstpcpy (signature, XCAR (val));
743 else 743 object = Qnil;
744 xd_signature (signature, 744 }
745 XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (object)), 745 }
746 dtype, CAR_SAFE (XD_NEXT_VALUE (object))); 746
747 if (!NILP (object))
748 xd_signature (signature,
749 XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (object)),
750 dtype, CAR_SAFE (XD_NEXT_VALUE (object)));
751 }
747 752
748 XD_DEBUG_MESSAGE ("%c %s %s", dtype, signature, 753 XD_DEBUG_MESSAGE ("%c %s %s", dtype, signature,
749 XD_OBJECT_TO_STRING (object)); 754 XD_OBJECT_TO_STRING (object));