Message ID | 20240112094641.1798143-1-gasmibal@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aku6Nfmi; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HtHjCGWI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TBGv72864z1yP3 for <incoming@patchwork.ozlabs.org>; Fri, 12 Jan 2024 20:48:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IH2WVZLi+9Mt4rEbld+kGzwyUps8h2M1DF8BHh6uX/Y=; b=aku6NfmiFnz7ll 0Kxfd8dNMWcs0XNM115ZqZw/IzlRie83HPauFK0VdywhG8PaZPAzDb5H3sVE/qMHX5W+vOk8NbXAQ MBETRn/LoDd+hRqhRcG1qTWI7AorYb+h4Tx20IKnp0xd+o18GQZR0fmV0eZM8z9+da6Sn5K00efwz 71oFelhR8TbseC86J13agDUs1qWi+BUSY2XFNnc8liQ4MsNzhx2XglEqPvfH+BOS62k79DPFWyuwz XzlR01/WPBDbkBDMM6pfLe2iZm5v8F/ztn7v26oNyAVbGDEjAqajb3ToJOiehYdAJZyPxn37xmRFw DgnOoqyv2sRcQA6POmOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rOE8X-002NyB-23; Fri, 12 Jan 2024 09:47:37 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rOE81-002NGH-1e for hostap@lists.infradead.org; Fri, 12 Jan 2024 09:47:07 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40e60e135a7so13092035e9.0 for <hostap@lists.infradead.org>; Fri, 12 Jan 2024 01:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705052814; x=1705657614; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jCRPiPjIAmzQM1uAoZx/6QlIvxbUVUCxJsqwhkhLivs=; b=HtHjCGWIXD0sGzVogAq6qxe3DYgbLj/5Lp9HK+SIJT/dfzpJfgvC/DXtlutxeGIDlP yRayLgvvCOzdl4d3TJTobW+SkfoqSNQfkFcbZaBxLRh69HV4k3GJ9gr2Ak1pSojjJQ54 IlSl/2FZ5JdWreX3XLfngaU8HeVaao1A+WnAb95iiJKMGicA07zGC9UFhLS7211PxKQ/ EIW4rY7ErZt84i0HsiIyj/0IvJAfVxotSeWe+U23UFoVIQw08bcGfG99HBSsoBi97q2i 33pWp2LD/EujtaPQW5qPomxWXb7gQALs7DCTa2PRYvrCWo18OsF5nxZ2WQMBow2QpsvV F3jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705052814; x=1705657614; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jCRPiPjIAmzQM1uAoZx/6QlIvxbUVUCxJsqwhkhLivs=; b=jrYan68cvrdKeMFvqOavSroaEQyNEhA+BAJzx25jkW+PEMg6oV5nYaArc3fYQasIs+ wBRPjro1bcjzaBIg00NYL0jqBtTsMKfwkd749qMuOnCrXcmKT7Ac73LXgm58W/2sRM/N D8k6jfYUtDhJxAmh7pTGFNJRSEXRtXJ/RUM2yGRy2XjbkvPNR+SLa+VCl93duCkYFb7N 8PYrgc8jBNJI76sqJ9GQl3uJbJk+bihKxrPolsk3hJ5vtxryZXYL3T2o8IA6ln0rIDwL fLa1njGGMQth2dQ6Sv/anhqAhd3wna21m9QQKjs09lO3G0JLE+JDlznD+2VEed4N2+GR r+8A== X-Gm-Message-State: AOJu0Yx0md5I/Oy2tTcRaeu0r8gBg5f4SZDp1Qplnd/XGQfRUYfs/GsL FcMNqHsGN9iFut2wTrI94NUalJJxBkc= X-Google-Smtp-Source: AGHT+IGwkKCRbfDwjUosjUZrkXkVVxcUWafLtFTdM8fQUyNRT8bKsnrbYcJKQ8CayQlFC9VdBgd2Hg== X-Received: by 2002:a05:600c:4506:b0:40e:50c5:d88b with SMTP id t6-20020a05600c450600b0040e50c5d88bmr620503wmo.14.1705052813769; Fri, 12 Jan 2024 01:46:53 -0800 (PST) Received: from sah1lpt685.softathome.com (2a01cb000b6bf000ec76f829e0801c0b.ipv6.abo.wanadoo.fr. [2a01:cb00:b6b:f000:ec76:f829:e080:1c0b]) by smtp.gmail.com with ESMTPSA id h5-20020a05600c314500b0040d7c3d5454sm8962668wmo.3.2024.01.12.01.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 01:46:53 -0800 (PST) From: Baligh Gasmi <gasmibal@gmail.com> To: hostap@lists.infradead.org Cc: Baligh Gasmi <gasmibal@gmail.com> Subject: [PATCH] fix initialize the variable before using it. Date: Fri, 12 Jan 2024 10:46:41 +0100 Message-Id: <20240112094641.1798143-1-gasmibal@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240112_014705_580661_2D1E8F2A X-CRM114-Status: GOOD ( 10.80 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: seg0 and seg1 variables can have any initial value, but they may cause bss to have a wrong configuration later on. Signed-off-by: Baligh Gasmi --- src/ap/hostapd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:331 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [gasmibal[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
fix initialize the variable before using it.
|
expand
|
On Fri, Jan 12, 2024 at 10:46:41AM +0100, Baligh Gasmi wrote: > seg0 and seg1 variables can have any initial value, but they may > cause bss to have a wrong configuration later on. Thanks, applied.
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 6a9b07e86..d6e3e4ede 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -3831,7 +3831,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd, struct hostapd_freq_params *old_params) { int channel; - u8 seg0, seg1; + u8 seg0 = 0, seg1 = 0; struct hostapd_hw_modes *mode; if (!params->channel) {
seg0 and seg1 variables can have any initial value, but they may cause bss to have a wrong configuration later on. Signed-off-by: Baligh Gasmi <gasmibal@gmail.com> --- src/ap/hostapd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)