Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21233164rwd; Thu, 29 Jun 2023 12:59:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qg75ogQ5OgEyyuFQLm70XCtpd6wRR1h1oPOiX4S2oxFbwcqcCzuZmv5Es0WXsPTSBo0Ld X-Received: by 2002:a05:6a21:3806:b0:12c:137f:1018 with SMTP id yi6-20020a056a21380600b0012c137f1018mr433814pzb.43.1688068770812; Thu, 29 Jun 2023 12:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688068770; cv=none; d=google.com; s=arc-20160816; b=W8/wmm8+57tChxCZUe0eUQTfMedcZGnyvvqAneyR54/r9md4pIK5Gqc79a3bVc9hxn BxVJcePdpQ9HE0OSHV8pttUOg4DbU3A9CwzQD/ObOFGI3a5/O9qy56ZOi62gpT975+bs jgstCYUBTRZiPfn07TpYww/3Yimv95jUn+mtOjIUDIAgqUZeS0cYRg0pJqaWEvEF10Bn 9CaCohJJOAyY8B8IiOr6rgvTSyHtweXNv4wOINZQQHKMxvHRZpM2XIf6cZ7TlU/rQ1zd 4/SG+/wtUUWqaMpZ7PkXD1GjMJ5lf7dZJ5P2apWMivnPuf+8cGe6qoygzjx3S9YiyLpV MqhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=q+OV1bbKxg/qKN6kdBFMoxPXZzLIbrPPPO3Omw1xni4=; fh=XXFPm58E9KOACrRu2A7kC1gCA2Lezax+36vtRGw1ZRw=; b=0c5UvNBWAWkAPNU7vGB/jldh2ORTaHpKHuHybSsh0h2r+muagSGyfssHByYKvMCHry 4FqM3H2aFT5uJ11bjhJtMzcRUJPpr90IhV2dCnpDWVVsBQxAHCYs9ST92Vts6ATejDJk R3q7c/zI0CR0KqMNI35rANoQDM/3YLsBlF6XwV0jB3dMsJAyTTwdlUJM6eatoW2hFxkv W0Dt1rqGVprCBg3o5KdYAZNr1Zmztdm49nd5L/NHCbeiRjIOCeOQhRiMerNofHilUf86 sOxmuu2PnX0lyS/fsnqi1MMBSxqzZTX6eL2HrjozToukU2qLlIS1EuuYwif2Qfn3QwQR luXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="FS/l9gah"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020aa78c44000000b006735cb33a69si8772841pfd.65.2023.06.29.12.59.24; Thu, 29 Jun 2023 12:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="FS/l9gah"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231742AbjF2TxB (ORCPT + 59 others); Thu, 29 Jun 2023 15:53:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231305AbjF2Tw7 (ORCPT ); Thu, 29 Jun 2023 15:52:59 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C44431FC0 for ; Thu, 29 Jun 2023 12:52:58 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-3457cba78f3so4967465ab.3 for ; Thu, 29 Jun 2023 12:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688068378; x=1690660378; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=q+OV1bbKxg/qKN6kdBFMoxPXZzLIbrPPPO3Omw1xni4=; b=FS/l9gahimbl0J09Gixz9uiu3Z7aMpDQP2/LStGjjfsQ44vpOqsN9dOOPcgn1i81Zx uydzRSYsCAUsCLnl4SvIFtY3mWQ05YBwRFLtSoNUTllgN+Im4O92sRi6btEG8+jLqAzn RY7Fm87Q8dx/3jE8hXJTcCafjR6Tos9bFhyTw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688068378; x=1690660378; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q+OV1bbKxg/qKN6kdBFMoxPXZzLIbrPPPO3Omw1xni4=; b=Wp3JQwTu0t+DGj7F4y/oZKVDKzE31K2269Czxspvy7M7HcLumwGEKS+FbABkCVba0w i9e+UR9EbQ/wbq+nk57gkTwEE4SBCLCDbxil7ss0em7C5UPhQ0rph+ZT385WiIYuEVmM 2YjhRi5cER0GMbymnhIHE4hQq5Yohu89TJzFXcG8MgdsGX50oYIM5+KCqDuOL46MZyjF JI3jjaNdei01FXs5Sf2auoHDT3o+L6+RnEXEqcK+yN9vFq4zhkcbNSiskcw46kSUYs04 uUpwE83AtdXOdRuF7bUiSmD+KbOSDOqkP3pySwx9zkGGpwEtufsFtxHbREGZnLUtESXF ZMYA== X-Gm-Message-State: ABy/qLaec+unYAsbulsjBNLwdZGGvOsqn0NciKZ9xplcNmEuYUpddIPn 7prmh52EtT6a7I4Juo5PVwCgiQ== X-Received: by 2002:a92:c848:0:b0:345:84ea:ace7 with SMTP id b8-20020a92c848000000b0034584eaace7mr138045ilq.30.1688068378211; Thu, 29 Jun 2023 12:52:58 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:3c2b:cbff:22ae:80d6]) by smtp.gmail.com with ESMTPSA id 14-20020a630b0e000000b0054fb537ca5dsm8983674pgl.92.2023.06.29.12.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 12:52:57 -0700 (PDT) Date: Thu, 29 Jun 2023 12:52:55 -0700 From: Brian Norris To: Dmitry Antipov Cc: Kalle Valo , linux-wireless@vger.kernel.org Subject: Re: [PATCH 2/3] [v4] wifi: mwifiex: fix fortify warning Message-ID: References: <20230629085115.180499-1-dmantipov@yandex.ru> <20230629085115.180499-2-dmantipov@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629085115.180499-2-dmantipov@yandex.ru> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Jun 29, 2023 at 11:51:01AM +0300, Dmitry Antipov wrote: [...] > This also fixes an improper usage of 'sizeof()'. Since 'skb' is > extended with 'sizeof(mgmt->u.action.u.tdls_discover_resp) + 1' > bytes (where 1 is actually 'sizeof(mgmt->u.action.category)'), > I assume that the same number of bytes should be copied. > > Suggested-by: Brian Norris I don't believe I actually *suggested* the change; I just highlighted that the size looked sketchy in the original code. :) But your change does look correct, and I don't see how we could possibly *want* to be off by 1 here, so: Reviewed-by: Brian Norris > Signed-off-by: Dmitry Antipov > --- > v4: fix memmove() size calculation (Brian Norris) > --- > drivers/net/wireless/marvell/mwifiex/tdls.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-)