Package: bluez-pin
Version: 0.30-2
Severity: important
Tags: patch

Hi,

  When bluez-pin is used with --dbus it just crashed upon the first pin
  request. This caused by reading data from an dbus message array without 
  first recursing into it. Fixed in attached patch

  Sjoerd

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-1-powerpc
Locale: LANG=C, LC_CTYPE=nl_NL (charmap=ISO-8859-1)

Versions of packages bluez-pin depends on:
ii  libatk1.0-0              1.11.4-1        The ATK accessibility toolkit
ii  libbluetooth1            2.25-1          Library to use the BlueZ Linux Blu
ii  libc6                    2.3.6-7         GNU C Library: Shared libraries
ii  libcairo2                1.0.4-1+b1      The Cairo 2D vector graphics libra
ii  libdbus-1-2              0.61-5          simple interprocess messaging syst
ii  libdbus-glib-1-2         0.61-5          simple interprocess messaging syst
ii  libfontconfig1           2.3.2-5.1       generic font configuration library
ii  libgconf2-4              2.14.0-1        GNOME configuration database syste
ii  libglade2-0              1:2.5.1-2       library to load .glade files at ru
ii  libglib2.0-0             2.10.2-1        The GLib library of C routines
ii  libgtk2.0-0              2.8.17-1        The GTK+ graphical user interface 
ii  liborbit2                1:2.14.0-1      libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0            1.12.1-2        Layout and rendering of internatio
ii  libx11-6                 2:1.0.0-6       X11 client-side library
ii  libxcursor1              1.1.5.2-3       X cursor management library
ii  libxext6                 1:1.0.0-3       X11 miscellaneous extension librar
ii  libxi6                   1:1.0.0-3       X11 Input extension library
ii  libxinerama1             1:1.0.1-2       X11 Xinerama extension library
ii  libxml2                  2.6.23.dfsg.2-3 GNOME XML library
ii  libxrandr2               2:1.1.0.2-3     X11 RandR extension library
ii  libxrender1              1:0.9.0.2-3     X Rendering Extension client libra
ii  zlib1g                   1:1.2.3-11      compression library - runtime

bluez-pin recommends no packages.

-- no debconf information
--- /home/sjoerd/Debian/build-area/bluez-pin-0.30/pin-dbus.c	2005-12-26 16:03:42.000000000 +0100
+++ pin-dbus.c	2006-04-19 00:16:48.000000000 +0200
@@ -71,8 +71,8 @@
 DBusHandlerResult
 bluez_pin_handle_dbus_request (DBusConnection *connection, DBusMessage *message)
 {
-  DBusMessageIter iter;
-  gboolean out;
+  DBusMessageIter iter, aiter;
+  dbus_bool_t out;
   bdaddr_t bdaddr, sbdaddr;
   int type;
   char *address;
@@ -109,8 +109,10 @@
 
 #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC
   nbytes = 0;
-  if (type == DBUS_TYPE_ARRAY)
-    dbus_message_iter_get_fixed_array (&iter, &bytes, &nbytes);
+  if (type == DBUS_TYPE_ARRAY) {
+    dbus_message_iter_recurse(&iter, &aiter);
+    dbus_message_iter_get_fixed_array (&aiter, &bytes, &nbytes);
+  }
   if (nbytes != sizeof (bdaddr))
 #else
   if (type != DBUS_TYPE_ARRAY

Reply via email to