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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D878AC48BDF for ; Tue, 15 Jun 2021 13:45:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0D2661369 for ; Tue, 15 Jun 2021 13:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbhFONre (ORCPT ); Tue, 15 Jun 2021 09:47:34 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:27227 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbhFONrc (ORCPT ); Tue, 15 Jun 2021 09:47:32 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1623764728; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=scxrBwWGr3JyMxv75SuwLWPc8G0Nv56Ryje1L/Thbro=; b=XQ5G175WAH4jjLvQgPBvNLV6h3Q+7Tx//BB0m+wre/yTTC7BsTp7YvT9Dzb3bBsRLOq3JzIM opmSbG926O/k/tWhvEZmww1DatIf5x8DT4rvyOdw6Tz+0W0+Nv7pI1RGvJW7TD4EurxOsBE5 OvdnGnq7URWEOel7IDHPnAWfb1o= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI5NDExNyIsICJrZXJuZWwtamFuaXRvcnNAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 60c8aeee2eaeb98b5efa464d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 15 Jun 2021 13:45:18 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1740CC43217; Tue, 15 Jun 2021 13:45:18 +0000 (UTC) Received: from tykki (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id F0503C433D3; Tue, 15 Jun 2021 13:45:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F0503C433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Dan Carpenter Cc: Arend van Spriel , Matthias Brugger , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , Hans deGoede , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] brcmfmac: fix a loop exit condition References: <20210615102656.DBB04C43143@smtp.codeaurora.org> <20210615125259.GB1901@kadam> Date: Tue, 15 Jun 2021 16:45:11 +0300 In-Reply-To: <20210615125259.GB1901@kadam> (Dan Carpenter's message of "Tue, 15 Jun 2021 15:52:59 +0300") Message-ID: <875yyfjl7c.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org Dan Carpenter writes: > On Tue, Jun 15, 2021 at 10:26:56AM +0000, Kalle Valo wrote: >> Dan Carpenter wrote: >> >> > This code is supposed to loop over the whole board_type[] string. The >> > current code kind of works just because ascii values start 97 and the >> > string is likely shorter than that so it will break when we hit the NUL >> > terminator. But really the condition should be "i < len" instead of >> > "i < board_type[i]". >> > >> > Fixes: 29e354ebeeec ("brcmfmac: Transform compatible string for FW loading") >> > Signed-off-by: Dan Carpenter >> > Reviewed-by: Matthias Brugger >> >> There was talk about v2, but I don't see it in the patchwork. > > Ah, crap. I started to debug Smatch to find out why it wasn't warning > about some of these bugs and I got a bit carried away writing Smatch > code and forgot to come back to this. > > I will send it tomorrow. No worries, take your time :) I just wanted to remind about this, or see if patchwork or the mailing list have lost patches again (which has happened in the past). -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches