From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30ED7EB64D9 for ; Thu, 29 Jun 2023 19:53:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231742AbjF2TxB (ORCPT ); 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-Google-Smtp-Source: APBJJlFgQSILukDVPI86cuF+TjImymhuaOloZ40+/0Sq93WevSmmmMUZIiKoebImyMe7EEvq3q51Tw== 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> 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(-)