summaryrefslogtreecommitdiff
path: root/obexd
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-09-03 14:58:37 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-09-03 16:28:01 +0300
commit498e067aba400d53e176d6914fa493efc2dbf0ef (patch)
tree68c6c7645edc8a8f87f11065252de948e7bc6dfc /obexd
parent55eebc598b1e182b2cbcfb78b4202d2ae2e52d73 (diff)
downloadbluez-498e067aba400d53e176d6914fa493efc2dbf0ef.tar.gz
obexd/mas: Fix crash when outparams is NULL
outparams can be NULL meaning no application parameters should be added to the response.
Diffstat (limited to 'obexd')
-rw-r--r--obexd/plugins/mas.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
index 24b26ae0e..fb97fe31f 100644
--- a/obexd/plugins/mas.c
+++ b/obexd/plugins/mas.c
@@ -676,6 +676,9 @@ static ssize_t any_get_next_header(void *object, void *buf, size_t mtu,
return 0;
mas->ap_sent = TRUE;
+ if (!mas->outparams)
+ return 0;
+
return g_obex_apparam_encode(mas->outparams, buf, mtu);
}