Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp368320lqo; Fri, 10 May 2024 02:19:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUriXi8vBgVX4YGlxrRPzu5HAvNtHQV2ki1GYWlh1zG2yTAnREFkWUwVqic94mulcSb+XtAE9F23VUXhTKKC/bwY1OM2cpSsdKImgupVQ== X-Google-Smtp-Source: AGHT+IE6nketj9sLh9RKbtogWLmo2Rs+c27jWB14g3t9qTUa+5XCUu5Z7dhYaaDWMKd1PfwuvM/e X-Received: by 2002:a17:90b:3005:b0:2b4:b306:ffda with SMTP id 98e67ed59e1d1-2b6cc758baamr1771931a91.19.1715332741149; Fri, 10 May 2024 02:19:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715332741; cv=pass; d=google.com; s=arc-20160816; b=LTgSxVJnHw16icw2ecaCLUi02/rWUvii4sR/aTre6Tn9KEsItMdt0kc4rTr1PN+JqX 6Tl+Lic4l4OmVvz5c34xS9wljqJiBSuK0fr2W2hxXNuEG00lsNqDDTjgbH/9zoHe62c+ OG0et7AEje86i8APOKZHD9MzyMo9VY465yitqhHkjN606mlXMcBE9F5SuIhg73suFGUo zxHtzze4EIJYg5z6sQIYcARwHhOQKCSzLybKbySPn1Ge6w5x6J6xYaSiZaILdaTt9snq HkqAerZhWtmCFFEB1+h8F31PFxFU6ubNTgJ8cO6xnq0XU+v0wQcSxkaGQon/4Lc3IYJR QxJg== 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:to:from; bh=GJd34udLe8uROIsb+wfORwHvVnlyFlFt2IMTUkZtg2g=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=mo23mm+pl1YpNYaCPabeH2LJhxONDE83TAcDu6AfCFVa0lCPTuCxCa5oKkT3gwOL8m tXZlIMWphZLQArnwAcS64ChdH+MtvcnPzDTl8VfNzuemibviWZLISCfl5CxfY/DR9L2S nuduM6I6ipKtRzVtONvkAQXjckmKiBoKW9tIKJE682Fjq4hH9qsE5SyZxQN6/pUOyES4 ksd5Hit2Dl5JZPNGiKWLKrz7XnVlHoFUxrhKWlXBVwEJfatx9Xdxi+cyhtweCULT0h2H oVC3AVwUfVbQ6nH6dA3IQKNwKLMMKRfgEPktrXs+HWVrSgpNl/3ASAjqSQKd7jFMkGC5 DdQQ==; 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-4450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4450-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628864992si5336455a91.24.2024.05.10.02.19.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 02:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hadess.net); spf=pass (google.com: domain of linux-bluetooth+bounces-4450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4450-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 130B1B21628 for ; Fri, 10 May 2024 09:18:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F254F1649A7; Fri, 10 May 2024 09:18:25 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 588391635C1 for ; Fri, 10 May 2024 09:18:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332705; cv=none; b=NMQt5huzusHLMCVCTVpy3ehS4mWsnmPKwHVi7EMBUa5V9eKItt9eK8RQr1RLaSBj0jt9EuExk5yrN8bTci45EPGDqb0w4zPbwjBUqhs6QXHpVderygLwfFnRDA0cpzY9SVl43bwaYW68gNp4yx+EEzAwdRIr8s39NQSYTFLEMLo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715332705; c=relaxed/simple; bh=e4R1NokF9Tm1x6vun3UbIi/yRcfytl5Tuws8X6RCSk8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=HqN5gmvvTBTmBaYKsV43ns9dZtW8YFkGCPlwp2NbftqwGKHeaVNRYL+8luNBnQtyP+vFYAPivDEkE2mfUOPc+uZc2OEd1K1bX21QcCVAvUUE1V6pa6+a+kS7KY2XPhNilR5zhmjbhs7MY/e6um3ZoL2ew7falJd+ygu4sbfAitE= 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.201 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 56E001BF203 for ; Fri, 10 May 2024 09:18:15 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Subject: [BlueZ 00/14] Fix a number of static analysis issues Date: Fri, 10 May 2024 11:10:58 +0200 Message-ID: <20240510091814.3172988-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 Hello, This is the first batch of bug fixes for issues found by Red Hat's internal static analysis tools. The best course of action would probably be to merge the one that are ready for upstream inclusion after review, and mark the others as needing work, so I can include a new version of the patch in following batches. Cheers Bastien Nocera (14): adapter: Use false instead of 0 for bool attrib/gatt: Guard against possible integer overflow client/gatt: Don't pass negative fd on error client/gatt: Check write_value() retval client/main: Fix array access client/main: Fix mismatched free monitor/att: Fix memory leak bap: Fix memory leaks media: Fix memory leak main: Fix memory leaks isotest: Consider "0" fd to be valid isotest: Fix error check after opening file client/player: Fix copy/paste error shared/vcp: Fix copy/paste error attrib/gatt.c | 8 ++++--- client/gatt.c | 21 +++++++++++++++---- client/main.c | 7 ++++++- client/player.c | 2 +- monitor/att.c | 19 +++++++++++++++++ profiles/audio/bap.c | 47 +++++++++++++++++++++++++++++------------- profiles/audio/media.c | 1 + src/adapter.c | 2 +- src/main.c | 4 ++++ src/shared/vcp.c | 2 +- tools/isotest.c | 4 ++-- 11 files changed, 90 insertions(+), 27 deletions(-) -- 2.44.0