Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp151734lqo; Thu, 16 May 2024 02:04:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdqzD903n4IyUC5tz+GvMbdGkh6cAdlgCiy0g+Q2jz33KwBkUmumSadq54iGbMonWKkKIl1V76ERPfAU0nawjr8U+8iLdzjnozqKso1A== X-Google-Smtp-Source: AGHT+IEeMayHEx5gm7DRvMmKbsIePe5p4qJ4zZjrfXpipE0ftzHSg4mRpBkL3N65lQ0Y/Fy9tTPN X-Received: by 2002:a17:906:17c5:b0:a59:c9ad:bd26 with SMTP id a640c23a62f3a-a5a2d54c601mr1121871066b.12.1715850253739; Thu, 16 May 2024 02:04:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715850253; cv=pass; d=google.com; s=arc-20160816; b=xvS+YMQa1C2bSBsVdgHmfv4GjsadeXKv5kX4xZiHvyuaRxGeK7Oss6GZuPQoj+wXXs 8VFoWzRbjLrKlprBgPeaHlhyoRr2lSGCjevSrWuB1Qh3DpV1CTxbw4sbxnCLDGG9X7Ww LKULrxADS0S59/MgemAS8Kz7RtqWuW3dmUISeg7olRtGCHu7FU0roUMvZaPBeQcQTHQx QbCC4+A2bbsR0M9e9X9RX0OGxaK0fd+Z1jJvNOG0erJGOqYsx3oSwW8L1/7abcsGSGTR 7NcwgTIZELUDIB7kb4PoI/lF3lB3K4awjF2BUTptsN7tWyf+4pH7x+3BiWEMg0uvN/d+ WDlA== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=veCzw+TB1e1ImTTw0HN+LZAa37c4QfYnkBofySDeXDE=; fh=uo5u2TQK/HQlhydMwGLjBAnuDwaLxndJ/cgWTjIagS8=; b=UVz3Z+ZqlHJ0gLXUYh4aZ7dxcKIkK43/Rd+ekCrEcjV5MRaaIC1w7mLacLAHmBzTIu BGhKB+NhC+gUzfKbAlzuKT2gKN1uuSKlS0rsgeL7teIxfG+jrTwvQJG/Ubk4ihxU/Ghk xYClpH73ePfAAH27D6XuztTthP4deE7nkn1WtVN8YEBzMFRypchNAX9bfvcjCIyrC+Vk Ycqxwr6u0JOFdLEZ0+QpWjdYv1Z8tLQ25m9PWgbY9P55Gx0T7UCgwJ3+/iy0sjzZuXeV N+/B70ktSmOM9KIrnyrVHSmnkfqulrshiJPR6hION//OfdM3jdECYoUrBHLfCHrXhRDw EtLg==; 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-4690-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4690-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-a5a179463basi809817466b.126.2024.05.16.02.04.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4690-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-4690-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4690-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 799011F23710 for ; Thu, 16 May 2024 09:04:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D452914374B; 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 3296F142E96 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=fnkgHbozWfbknAzGALYNzuctnxWKlYHDc1XQ7OllS+3j+naUfWTshJTSsxMr8aoYa2nezg77dtGSnjv72k8gFYYWXboOWU0VTpWvQZpJ7llaGmUZaLI0P//mC9sQJGVsEDlmGzYbAfGBt3oV9nkakLQ9oZnx28kNcus54dthfY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715850230; c=relaxed/simple; bh=qgt4Ntngs7YG4F+yMa9fB5zhvbuMNsssLDX4d2JLqrc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=miY7wlnTf1X/JV/wSP6OFkkyJ8Qvv1IZsasnqWIuoEf6Xhto7n05f3CCjJqmoo1uRbiPKU/kNmic/es5XY2frxTQEPnKQs1BU1stqsT0HERuDBvHQQfl7B7mrz2x0iL2apPgGUd/noisY4rjyE9Qk5vVuE7RoPVD4S2aDKLQi8k= 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 0D7F71C0017; Thu, 16 May 2024 09:03:42 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ 07/15] test-runner: Fix uninitialised variable usage Date: Thu, 16 May 2024 11:03:11 +0200 Message-ID: <20240516090340.61417-8-hadess@hadess.net> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240516090340.61417-1-hadess@hadess.net> References: <20240516090340.61417-1-hadess@hadess.net> 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 Error: UNINIT (CWE-457): [#def64] [important] bluez-5.75/tools/test-runner.c:701:2: var_decl: Declaring variable "envp" without initializer. bluez-5.75/tools/test-runner.c:739:3: uninit_use_in_call: Using uninitialized value "*envp" when calling "execve". 737| 738| if (pid == 0) { 739|-> execve(argv[0], argv, envp); 740| exit(EXIT_SUCCESS); 741| } --- tools/test-runner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test-runner.c b/tools/test-runner.c index ff5e19825801..908327255ad7 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -698,7 +698,7 @@ static const char *btvirt_table[] = { static pid_t start_btvirt(const char *home) { const char *btvirt = NULL; - char *argv[3], *envp[2]; + char *argv[3]; pid_t pid; int i; @@ -736,7 +736,7 @@ static pid_t start_btvirt(const char *home) } if (pid == 0) { - execve(argv[0], argv, envp); + execv(argv[0], argv); exit(EXIT_SUCCESS); } -- 2.44.0