Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp153394lqo; Thu, 16 May 2024 02:07:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2mDkPBU1CsLlea0Rrpk+Vf54E0uTtZ25Q5KbppNS9MK4V6uL67mSDZTNx0rRSlMwf4kHv9Vgm20uaoRSxs2x3eCZnR6w0LGN4eQ7LqQ== X-Google-Smtp-Source: AGHT+IHDfrA5TkY5wqaa3oPfPfSyVB/DSeRjgjSEWjiio1ApCb517oA0ELfiNNgqxrzLAXlG/5BB X-Received: by 2002:a05:6a00:1d98:b0:6f4:463f:af87 with SMTP id d2e1a72fcca58-6f4c91d15eamr27293779b3a.10.1715850472944; Thu, 16 May 2024 02:07:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715850472; cv=pass; d=google.com; s=arc-20160816; b=R53nCLT+pTilpR/ij9loSJAHyahPDJEedc6tQrZJMkHA0ymdLhDDVpY1BHAfSo+HJr N5K/Msw5yXNyRFmurypLqDCFcSRkpYaK8VXzf8q4UcHyiynoIqp4El4EUoWVac9eXoqy JXxZ0ctJ9JsOdKm8lQN+x0vrM7OravhMOGZJtbMMIf48SgAt8URGY8gYdoaPQJnMMxee sJ8mhsjDsXmf54A54qXQnxAdvYP1RcW2hvDYGBS22ZNjvtF3yODWQVazX7ELBTNS4U0K deQFPPLPs3X+tk0YDj9D1KeutD1VEqCo4j/LoECdKdFMEztZ3400A+qRjYy1TOdcFKY5 VECw== 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=ai6SIcqopXwLTvEda86OgRN++LkFCtocalXlR88mI3Y=; fh=uo5u2TQK/HQlhydMwGLjBAnuDwaLxndJ/cgWTjIagS8=; b=jvRy6D7E2TalK5Pt1y1q6KBVVZUD364TEUF86/WoV8suephZ+tj3NGdW79ss1AlGy/ IhgTMT5wop3xVXfwcJNXc3tqPNfOfWtVtMz7R2roxR46WcJud7gSIp28810GzqIeXZdO Ww3JUCZ0ExBWtbxSs6S5se9fQQISCNTKRcqBIqYgxAWslNfF1phlOl0iKQ1K36KsN4oH TZ3SdZYti0R/nkj58TY5ViS6py/r/LyEXXfbDeckGWbzTcEgnwBTzA0xGbvEjphcoQtP PAF5Wcd0NL48Yv4iESzXfoIw2IbtyUJARrYrzhi2ZjUfmCgUJUZvqma4zNjPPT0kKvBE ew9g==; 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-4692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4692-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4f8a10355si9924093b3a.352.2024.05.16.02.07.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hadess.net); spf=pass (google.com: domain of linux-bluetooth+bounces-4692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4692-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 3A6DBB236C2 for ; Thu, 16 May 2024 09:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 189FC143752; Thu, 16 May 2024 09:03:51 +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 328EE142E91 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=CYrfVvJqU132dSRl0D0ZKeIEM6weNLRWNywx0AA/3QOhuobyMBpzbXA+2v3Em+RzPOdgoiGc5esE/YdwTik/oCKx6ZvtQ2p8Zl9XjmX7ElQ0OQvNST7Uq7jLj2lqLBY4My5h9BGIJdF9hcUbLj4YJ3ILoxrJEgb1pbk8dv3Zr0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715850230; c=relaxed/simple; bh=G0YIdC2Ro9VnFebL+xvd7S9Fy6i8yWt/cOQX3ft3yIg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VVNp0II0ksUomc99Bzl+bAYuH85aenwgOqDszJbTBn/OHB5rnvahoWXwit7WoRZ68VRLRSz0vGUmS4skMyVauz0RiUs9AZ05UDJXV6yypmV75Ah+A3iQaVU965r2Ctl1rc79rykJV6oadGHOpYTfPUTsdPpH8rdLOsvVK07T9/U= 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 7262B1C0015; Thu, 16 May 2024 09:03:42 +0000 (UTC) From: Bastien Nocera To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera Subject: [BlueZ 05/15] test-runner: Remove unused envp Date: Thu, 16 May 2024 11:03:09 +0200 Message-ID: <20240516090340.61417-6-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): [#def70] [important] bluez-5.75/tools/test-runner.c:644:2: var_decl: Declaring variable "envp" without initializer. bluez-5.75/tools/test-runner.c:682:3: uninit_use_in_call: Using uninitialized value "*envp" when calling "execve". 680| 681| if (pid == 0) { 682|-> execve(argv[0], argv, envp); 683| exit(EXIT_SUCCESS); 684| } Error: UNINIT (CWE-457): [#def71] [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 5bdcf42fcd7a..134e26f9c691 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -641,7 +641,7 @@ static const char *monitor_table[] = { static pid_t start_btmon(const char *home) { const char *monitor = NULL; - char *argv[3], *envp[2]; + char *argv[3]; pid_t pid; int i; @@ -679,7 +679,7 @@ static pid_t start_btmon(const char *home) } if (pid == 0) { - execve(argv[0], argv, envp); + execv(argv[0], argv); exit(EXIT_SUCCESS); } -- 2.44.0