From 498e067aba400d53e176d6914fa493efc2dbf0ef Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 3 Sep 2014 14:58:37 +0300 Subject: [PATCH] obexd/mas: Fix crash when outparams is NULL outparams can be NULL meaning no application parameters should be added to the response. --- obexd/plugins/mas.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.47.3