From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id F399E7803CE for ; Wed, 15 Nov 2023 08:58:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=yFmwHXFm5fJbJVEV7rlYq4drfU7xBbJtIJHpLTjSMiU=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700038707; v=1; b=eyHYDKVNStAmQ5/FEYNcsfxKa2oehOc8G0W3RLld72DN59POXikmbLwonwlSOXNomyz1QmOV 0jXo5dS59Q1P9Kep2zUxRRg++FYy2pHB1tP0xsMCw8Yf2xJV37hsYdwDzZ6ehS7KFPBCSHVeAtM h/lkYyN07eCRL6j53RnU9im0= X-Received: by 127.0.0.2 with SMTP id XIkXYY7687511xfpO86Bpr4g; Wed, 15 Nov 2023 00:58:27 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.9244.1700038706952177967 for ; Wed, 15 Nov 2023 00:58:27 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-253-az2E_aKsPXOXgEtaOAosiQ-1; Wed, 15 Nov 2023 03:58:23 -0500 X-MC-Unique: az2E_aKsPXOXgEtaOAosiQ-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E5065821BC2; Wed, 15 Nov 2023 08:58:22 +0000 (UTC) X-Received: from [10.39.192.211] (unknown [10.39.192.211]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12DA11C060AE; Wed, 15 Nov 2023 08:58:21 +0000 (UTC) Message-ID: <18a67d6e-36b5-eff4-8403-7f4d993af08c@redhat.com> Date: Wed, 15 Nov 2023 09:58:20 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v3 1/2] MdeModulePkg/Bus/Pci/PciHostBridgeDxe: Fix OVERRUN Coverity issues To: Ranbir Singh Cc: devel@edk2.groups.io, "Kinney, Michael D" , "Ni, Ray" , Veeresh Sangolli References: <20231109173908.364630-1-rsingh@ventanamicro.com> <20231109173908.364630-2-rsingh@ventanamicro.com> <88f1fa80-8639-3abb-8030-ec4f02b80358@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RA0EajmqOKLyimUj2l5TrfEzx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eyHYDKVN; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 11/14/23 17:34, Ranbir Singh wrote: > Though you already gave R-b, the return statement needs to be added to > explicitly and completely rule out ARRAY_OVERRUN issue by static > analysis tools. > >              ASSERT (Index < TypeMax); > + > +            if (Index == TypeMax) { > +              CpuDeadLoop (); > +              return EFI_OUT_OF_RESOURCES; > +            } > + Works for me! If the "return" there is the only change in the upcoming v4 of this patch, then please just carry forward my R-b. Thanks! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111245): https://edk2.groups.io/g/devel/message/111245 Mute This Topic: https://groups.io/mt/102490513/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-