From patchwork Tue Oct 8 19:37:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesus Fernandez Manzano X-Patchwork-Id: 1173494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=galgus.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qAxVkKOq"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46nngj6hSjz9sDB for ; Wed, 9 Oct 2019 06:37:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UPYo3liPRRgZioUN3yEm2QT9uX0FACVyI93aE78Rcb8=; b=qAxVkKOqwZlcPs 1/aIalM7nXV1YxvLTN+RdVmo/HOKKAKIWxA1udeYjsxqhXREMO+gCbecNd0ftIMGQwt5tuXJ8mcuY oEy/6P3dAZyRIJFmF1JydJV4OOLT6fU5qsy+YozIF7MNlVBJqttAJ4DXJlVW0d1TQig3Vke8aKKX6 HuX9E1YiaBPwyDWeIoxeQ9eqfwQbyY81ULVmf1t+WwnFzP9g8Rvnaj2OCMHm/LDS5nmYvwrYA1xMR QHOiUk0vqqVFkUyx6h9nArZHrWD2ZcYl383jr/kq31qd8SGWPawGMwtfSFdPgcX5/yOhMm1imJA7v E+HFUc4THHBemjQop+Wg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHvIq-0004mu-Lh; Tue, 08 Oct 2019 19:37:48 +0000 Received: from 3.mo173.mail-out.ovh.net ([46.105.34.1]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHvIo-0004mO-2D for hostap@lists.infradead.org; Tue, 08 Oct 2019 19:37:47 +0000 Received: from player758.ha.ovh.net (unknown [10.109.159.123]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 8066711B7C9 for ; Tue, 8 Oct 2019 21:37:39 +0200 (CEST) Received: from galgus.net (static-230-243-84-188.ipcom.comunitel.net [188.84.243.230]) (Authenticated sender: jesus.manzano@galgus.net) by player758.ha.ovh.net (Postfix) with ESMTPSA id 4A51BAC24A71 for ; Tue, 8 Oct 2019 19:37:38 +0000 (UTC) From: Jesus Fernandez Manzano To: hostap@lists.infradead.org Subject: [PATCH] common: Fix same expression checked twice in fils_key_auth_sk() Date: Tue, 8 Oct 2019 21:37:31 +0200 Message-Id: <20191008193731.9485-1-jesus.manzano@galgus.net> X-Mailer: git-send-email 2.17.1 X-Ovh-Tracer-Id: 16537780784529556672 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrheelgddugedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenuc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191008_123746_253026_46C4C760 X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [46.105.34.1 listed in list.dnswl.org] 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Jesus Fernandez Manzano --- src/common/wpa_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 142dace4a..90bd23a0f 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -686,7 +686,7 @@ int fils_key_auth_sk(const u8 *ick, size_t ick_len, const u8 *snonce, len[2] = ETH_ALEN; addr[3] = bssid; len[3] = ETH_ALEN; - if (g_sta && g_ap_len && g_ap && g_ap_len) { + if (g_sta && g_sta_len && g_ap && g_ap_len) { addr[4] = g_sta; len[4] = g_sta_len; addr[5] = g_ap; @@ -717,7 +717,7 @@ int fils_key_auth_sk(const u8 *ick, size_t ick_len, const u8 *snonce, addr[1] = snonce; addr[2] = bssid; addr[3] = sta_addr; - if (g_sta && g_ap_len && g_ap && g_ap_len) { + if (g_sta && g_sta_len && g_ap && g_ap_len) { addr[4] = g_ap; len[4] = g_ap_len; addr[5] = g_sta;