Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp151756lqo; Thu, 16 May 2024 02:04:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5G1RudH6kYMi16D7q6ci0eqdOlK0k3TmicrP0L1FkXj9Y/HBGOtTrEIjlAhS/M0ZVR9zReM3XkwOBjaNrrWwCl/d/4c4rC2jq00b/ag== X-Google-Smtp-Source: AGHT+IEup0rj0FU/cW7ED0MYja6Q8UA7C0Vp6GYX1FyG1fPYYlndnpnC52KJ5E+RrgG2uiZwb7vX X-Received: by 2002:a05:6512:3c9a:b0:521:7846:69d3 with SMTP id 2adb3069b0e04-5221027858amr18813862e87.55.1715850256221; Thu, 16 May 2024 02:04:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715850256; cv=pass; d=google.com; s=arc-20160816; b=aMCLT37QpMQtXY83QeQyfTF867QdE/HCFYwOEQvvA0XmIaTvGqi6vte7goIodIKaBH jgVHdLQAS/FqCFvmqQou4ZkLAOTfivL02kcnLfI+3BCXQPDqZMWK1Zvm5Mhr3SkDeo/c cKKBjvPY2joiYvsPNELYGSOGCRdgjnbEJ8iWX2nqHfVEx7lNnY/4cENWj6lBwj5qtVjb ANVvXyfP+GYCtBwSbwX1xboxlvZPn2U8D/f8Zwumhlj02YP61dkwnLZWKwaVrvQ2qbij qfY1xzux32ytKMb2RDVu2J/2+Ea9FSCHwr6jF1U1FbJHiSltriNAdoT5kjU/wOAxF6jb RHAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=oll9IU1nqTCdfJxEoVC8OyMmFq5TGkZoLNmngBz4wIQ=; fh=uo5u2TQK/HQlhydMwGLjBAnuDwaLxndJ/cgWTjIagS8=; b=gILJmOn4FItjrBBSF6CBTfDQF8SRs37wdmrvm5vbenmlsrudzrUY23q4YUHn9XoihJ 7MZxoqDeKK/ZmIpcQSjDbTBnndtK5DBNjdR+0wOs7yOG+MATInx5pSlGrI17r5Nmlibn VgynXSx3HQs5V5CfdutQZAi25pQrVjAWEwqhk5ZlE4rJ9nvfY6Ws7m3RA/ZbEJh9nlye tjxYd4dJ4XmPfU4Zx4OuSCDlzQE0p2DaqM5swAYWMitQ37rvGqI6LvFDuJ/kHUOcVjur mBAClxASsP2DvDY1+VKmAz+tvv3HUsj3cYOzdXStFWmEpmGyhPW6t/doO0oyP9bVbRzv CEeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hadess.net); spf=pass (google.com: domain of linux-bluetooth+bounces-4691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4691-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21bd6si830273066b.375.2024.05.16.02.04.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hadess.net); spf=pass (google.com: domain of linux-bluetooth+bounces-4691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4691-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EBBAB1F2217C for ; Thu, 16 May 2024 09:04:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDB5014374F; Thu, 16 May 2024 09:03:50 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B8C0142E9D for ; Thu, 16 May 2024 09:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715850230; cv=none; b=KlC/Zk0K8C2yL1bDRSSTvnltRl34fpiYhuklQaTxFpquCZIruWupBTnCxe1D9mMva7u9ACteOtzAGQsD1l51KKL81QZw6B1a0TTOxNm8JK/UFZNlGT5KdbqTFEvGihXJ6vPY7rl/BUiQyA2qfyP1Qh5/845orq5eSORs14dnwyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715850230; c=relaxed/simple; bh=JhKx39PYa8ptl/+65Vw7X/x+3AKi/DDJcPudIuqVM7c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AzegAEU3WLeXIkxVZS714x/fQW3j7+4ADPAS9MovzZ3KJS5vuM/i+tcBz8T6OIIhtNrlYlMyzRX+8KalRzSG2XL7NX3x38xHXqqeEoBuIfb+l34yTj2p0UsuSxVwl4Jc2N0XBWlhTE2526dcVWKG4FHFXMI8wCx8pGQrhI0N380= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net; spf=pass smtp.mailfrom=hadess.net; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hadess.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id F045B1C000C; Thu, 16 May 2024 09:03:40 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ 00/15] Fix a number of static analysis issues #2 Date: Thu, 16 May 2024 11:03:04 +0200 Message-ID: <20240516090340.61417-1-hadess@hadess.net> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: hadess@hadess.net "main: Simplify variable assignment" makes a come back, moving out the single special-case out of the function. For "shared/gatt-client: Fix uninitialised variable usage", please verify that this default value is correct. Happy to iterate on any patches you feel are suboptimal. Note that the only patches that received any sort of real-world testing are the one mentioned above and the gdbus one. Cheers Bastien Nocera (15): main: Simplify variable assignment shared/ecc: Fix uninitialised variable usage shared/gatt-client: Fix uninitialised variable usage tools/mesh-cfgclient: Fix uninitialised variable usage test-runner: Remove unused envp test-runner: Fix uninitialised variable usage test-runner: Fix uninitialised variable usage shared/bap: Fix possible use-after-free isotest: Fix bad free test-runner: Fix fd leak on failure isotest: Fix string size expectations mgmt-tester: Fix non-nul-terminated string gdbus: Check sprintf retval shared/bap: Fix memory leak in error path android/handsfree: Check sprintf retval android/handsfree.c | 14 +++++++++--- gdbus/watch.c | 46 +++++++++++++++++++++++++++++----------- src/main.c | 19 +++++++++-------- src/shared/bap.c | 19 ++++++++++++----- src/shared/ecc.c | 2 ++ src/shared/gatt-client.c | 2 +- tools/isotest.c | 20 +++++++++++++---- tools/mesh-cfgclient.c | 3 +-- tools/mgmt-tester.c | 8 +++++-- tools/test-runner.c | 15 +++++++++---- 10 files changed, 106 insertions(+), 42 deletions(-) -- 2.44.0