Now len has the correct value: sizeof(sco_opt) --- common/btio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/btio.c b/common/btio.c index 9ff407f..030feda 100644 --- a/common/btio.c +++ b/common/btio.c @@ -573,8 +573,8 @@ static gboolean sco_set(int sock, uint16_t mtu, GError **err) if (!mtu) return TRUE; - memset(&sco_opt, 0, len); len = sizeof(sco_opt); + memset(&sco_opt, 0, len); if (getsockopt(sock, SOL_SCO, SCO_OPTIONS, &sco_opt, &len) < 0) { ERROR_FAILED(err, "getsockopt(SCO_OPTIONS)", errno); return FALSE; -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html