Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7378499rwl; Thu, 23 Mar 2023 03:36:46 -0700 (PDT) Authentication-Results: mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=fkSCbJva X-Google-Smtp-Source: AK7set8XWTMiTMz/MhQwbhJpctRfz1GexX8hwInKtGm5WhlT2iOwL05p2Ii/8vtpWwXRfkq2+sME X-Received: by 2002:a17:90b:17c5:b0:233:e9a7:209e with SMTP id me5-20020a17090b17c500b00233e9a7209emr7240757pjb.28.1679567806630; Thu, 23 Mar 2023 03:36:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679567806; cv=none; d=google.com; s=arc-20160816; b=jKDN/RTzry3UeXNXvg4wMgEF+ws1zyzxrBsdZoJ7fr/hi9VYTxTOLi2oJsBP2QoYIg 90JqNV8yk2FImG0ESuVzpP6JSGFTh1he8+VXUpy1TCU9pkF5ni8KqT8ljP12NLVHSnAj g74ebCjnb5sZwuMNfAyu80zLluoFWIQDEhxAbsHw/8LUCqkOlKVZUZiABUVtCByfc6ux uVq1Ml42XFB4omG1nJRCtvPTnvLTrEQw39aHvxU4ddetEEjU+wrtL8+/3K4nThOIHmAT GC4mnjwdrf5gyrrzomVaBpwxiAlndbmABNK0hByo7ah1UKkK8IrpslD6jR7y3St4AK4M n9Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qTSY9/BynlPk9okaQr3cojHCjORIEnPdMAyqjbbvnLc=; b=hfKoQnzIsLAX6kM8RC1IZVzVS2YZP30CD8d+MxZma6bFuqtoV5gXifv8MPlzsn8qNm h75BuCLlBb9r8XksSNAMyY0f0Y/Vgrn1dQg8H1b1L8Ejf6/iz10wBdmFxB9zohJPGlRO +BpygxM5WtrL/u5I0YbQ43y28frhc0QqHjxYxARdw5nRf0OXgWAVJ6FJHAxfADisIL33 vr7kJAOeD0KgrWHGGxJOhcZKOSQHWMoytKc5OXo3ow7xOYyakW+9WVjnUDgC1Jb2D461 sXf2+cHmFUgU5fe8aeIfwgsHRMd9v4+4OVcmiJVXOzI9j/xU5NjOGBlauR4O6euxEvJY Xr/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=fkSCbJva; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=streamunlimited.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a17090a408c00b0023f5ee62c13si1379673pjg.179.2023.03.23.03.36.33; Thu, 23 Mar 2023 03:36:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=fkSCbJva; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=streamunlimited.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbjCWKcj (ORCPT + 99 others); Thu, 23 Mar 2023 06:32:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjCWKcK (ORCPT ); Thu, 23 Mar 2023 06:32:10 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4B61C33D for ; Thu, 23 Mar 2023 03:29:03 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id x3so84234603edb.10 for ; Thu, 23 Mar 2023 03:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamunlimited.com; s=google; t=1679567342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qTSY9/BynlPk9okaQr3cojHCjORIEnPdMAyqjbbvnLc=; b=fkSCbJva1GaZJmiNgJ0kvCGAv6wE/Wg1lnoSWvOJ80W3xefSas8xemgAzpdorMc18z C5HcXZH1SOW7W4cbOZcj1fPAIkJ/e/FVkew4QARI6ReWKW0cq3jg62yFmSq/78qHjmY1 WSrpggz0UZE+nEptQHAzjx5jvhcRlTDtuNm3A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679567342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qTSY9/BynlPk9okaQr3cojHCjORIEnPdMAyqjbbvnLc=; b=WJRMNMsZ0tIDy1aXYkukBsz5GKp2NwL3G0GEulyugKQXxpnkKhtFNhtwYlliZnntqE u3xzqjkqnPgKAHRc1+lefdI8AV6Z1BeJNUajeSA1CqacPiwGwB3pihgL8gXNa+ard/BE xhorKdb/XD99eJ6DrtNnqJZlPuS6ukMEX2PuVDT6gzkjG2dNBFFh/pd1DdwkJN65agOU +FOn9TmA771Ar9HGhaN6TGgqCVgLpZvXQvcael6/eGF0JIkhGywJNINYdd9LBXqivxc4 pUpd4QYdLYyDskC7VH1ubNlwJLtRQ++E0z5N82iVL9FUBKQIGzrJsT11vZWxXnkKKVqf ebeA== X-Gm-Message-State: AO0yUKX1RynhuCygKwY7vPFGjcxo8GDEMiLoTeGl4dSeuplVoCJLeZS9 MdVktjf88oLAxQITTExKUsBQWOdRhBzGhqGbuWo= X-Received: by 2002:a17:906:ce23:b0:932:7f5c:4bb2 with SMTP id sd3-20020a170906ce2300b009327f5c4bb2mr10019155ejb.75.1679567341835; Thu, 23 Mar 2023 03:29:01 -0700 (PDT) Received: from smi-ubuntu.sueba ([2a01:390:0:101:4f8c:7da4:48b2:8bd2]) by smtp.gmail.com with ESMTPSA id s9-20020a170906454900b008f89953b761sm8459883ejq.3.2023.03.23.03.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 03:29:01 -0700 (PDT) From: Simon Mikuda To: linux-bluetooth@vger.kernel.org Cc: Simon Mikuda Subject: [PATCH BlueZ 1/2] monitor: Fix crash when there is no write handler Date: Thu, 23 Mar 2023 11:28:57 +0100 Message-Id: <20230323102858.566934-2-simon.mikuda@streamunlimited.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323102858.566934-1-simon.mikuda@streamunlimited.com> References: <20230323102858.566934-1-simon.mikuda@streamunlimited.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --- monitor/att.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/att.c b/monitor/att.c index f9643b333..d3b82074f 100644 --- a/monitor/att.c +++ b/monitor/att.c @@ -2946,7 +2946,7 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle, return; handler = get_handler(attr); - if (!handler) + if (!handler || !handler->write) return; handler->write(frame); -- 2.34.1