summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-05-11 17:32:20 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-05-11 17:32:20 +0530
commitec316b04acb9b3f0a79f7e5d322674f3fa241338 (patch)
treec28f4721538265b3c98c7a6770f5f6ba152d5ab2 /src
parent7bb8442c111d5e1fba20eb101eb854edd5392627 (diff)
downloadpulseaudio-ec316b04acb9b3f0a79f7e5d322674f3fa241338.tar.gz
bluetooth: Fix crash due to usage of pa_bool_t instead of dbus_bool_t
pa_bool_t and dbus_bool_t cannot be used interchangably since their size might (and do) vary. This caused a crash on some systems which was reported and root caused by: Aidan Thornton <makosoft@googlemail.com>. Ref: https://bugs.gentoo.org/show_bug.cgi?id=398097
Diffstat (limited to 'src')
-rw-r--r--src/modules/bluetooth/bluetooth-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 3f39a91c2..b7865028a 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -753,7 +753,7 @@ int pa_bluetooth_transport_parse_property(pa_bluetooth_transport *t, DBusMessage
case DBUS_TYPE_BOOLEAN: {
- pa_bool_t *value;
+ dbus_bool_t value;
dbus_message_iter_get_basic(&variant_i, &value);
if (pa_streq(key, "NREC"))
@@ -1144,9 +1144,11 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
goto fail;
dbus_message_iter_get_basic(&value, &dev_path);
} else if (strcasecmp(key, "NREC") == 0) {
+ dbus_bool_t tmp_boolean;
if (var != DBUS_TYPE_BOOLEAN)
goto fail;
- dbus_message_iter_get_basic(&value, &nrec);
+ dbus_message_iter_get_basic(&value, &tmp_boolean);
+ nrec = tmp_boolean;
} else if (strcasecmp(key, "Configuration") == 0) {
DBusMessageIter array;
if (var != DBUS_TYPE_ARRAY)