Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4788616ybn; Sat, 28 Sep 2019 07:27:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWBbiHL7Tl+prcoFGQlGhgDDSEEflBkKTtOJlyDGOO8Hvd5CLnfTmm1kQE1Xwn+736oQ8W X-Received: by 2002:a17:906:9498:: with SMTP id t24mr11823550ejx.88.1569680825870; Sat, 28 Sep 2019 07:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569680825; cv=none; d=google.com; s=arc-20160816; b=GYnFVweOdjiysvml8kzyhL8MtJYzyHE6nPxQoCK3cC+kntWWcOLdP3J6knSUpGoOhB ANrkv9UpLfJW40ljpsJdqj4dPHrbsivcxnz6uTu0CpOtJCKwl+qlCODcyeR4vArEFmgw KVN761le8oF5UWsvGOAmUy/yecQOT0WYACfjKlJWBZnWyc0SonIB00xpnqHGtw9RJepf Dk4RZqbTS6bZjNwmfMVy58SPJCJASAZzd0T07KafFaaLEy3M2ZQkgTcFIJcGWgnDcbK6 YhuIeTmnezjgBnhG+Utqyol3uVnMAQ7g5M/b1IFsnbZI9Y7PZJcyWWLQklO/SDPQkphp UWng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=QNJuKu6RTCZIMQODJAHSVXcSXU5go6Sd0VGtcsalwp8=; b=DWXGTUTWU21CV+6exUdwJXg6Cx6AfrQ1RmEM+QCRXwa4W+nWjmyq+CGvqibAz+eFDw LhMTfCBgES54XJmTuJJk7R5QjuBxcozwEhccieqZVomUZ2r6MGqivOBQZx4YCFLAw1w6 IL2S2wBTOwYN7waEPlUt1E8xk3EPkjC3DzJQNMDxK5+FvxfAwZwr7JimsbJNMgtIFtto ayMxzzRPf1qhcQCkHCSlF3ad/SRi3q8EWsBJtLarF6uyoRx2iyNXwoPDfEtox+3YK0U0 byPCGtFIhKYJRx5oUcRzg3dx8tpBLauSiVoEr5dAeErLymH6YlygEAhONXfXdLJrdGeg ayOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b=wVIKsLtd; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22si4149344ejx.203.2019.09.28.07.26.19; Sat, 28 Sep 2019 07:27:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mnmoran.org header.s=dkim header.b=wVIKsLtd; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726026AbfI1OPU (ORCPT + 99 others); Sat, 28 Sep 2019 10:15:20 -0400 Received: from hoster906.com ([192.252.156.27]:42500 "EHLO hoster906.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfI1OPT (ORCPT ); Sat, 28 Sep 2019 10:15:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mnmoran.org; h=from:to :cc:subject:date:message-id:in-reply-to:references; s=dkim; bh=P FKk8Slfqqq6U2fFl6bBw1p1uhXc4VoV4AqjnCh7iJk=; b=wVIKsLtddPLh0hcqq TB+KnOtxuCvenjjXPFfFMC3SRsf9yel4cZVy4T3FlooiBPEk/wQcUjxHjoSSQVZx zu+2xSiK2PCxf2d8/+ncIW3+p3kD1+oCofY3D+dMb46Aph9pFQXIQdLjeddlqwl4 nKacOaQJZwjQTSPwkp3vrIdOYs= Received: (qmail 32463 invoked by uid 503); 28 Sep 2019 14:15:18 -0000 Received: from unknown (HELO lespaul.Home) (mike@mnmoran.org@50.96.104.71) by hoster906.com with ESMTPA; 28 Sep 2019 14:15:18 -0000 From: "Michael N. Moran" To: linux-bluetooth@vger.kernel.org Cc: "Michael N. Moran" Subject: [PATCH BlueZ] The meshctl sock_write() max_len variable is declared as a uint8_t, which causes the calculation of the GATT MTU to be truncated when the MTU (write_mtu) is greater than 259. This error causes incorrect segmentation. Date: Sat, 28 Sep 2019 10:14:03 -0400 Message-Id: <1569680043-2874-2-git-send-email-mike@mnmoran.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569680043-2874-1-git-send-email-mike@mnmoran.org> References: <1569680043-2874-1-git-send-email-mike@mnmoran.org> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: "Michael N. Moran" --- tools/mesh/gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mesh/gatt.c b/tools/mesh/gatt.c index 0a942d4..c9e789c 100644 --- a/tools/mesh/gatt.c +++ b/tools/mesh/gatt.c @@ -189,7 +189,7 @@ static bool sock_write(struct io *io, void *user_data) struct write_data *data = user_data; struct iovec iov[2]; uint8_t sar; - uint8_t max_len; + uint16_t max_len; if (data == NULL) return true; -- 1.8.3.1