From nobody Thu May 16 20:49:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67517+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67517+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1605252798; cv=none; d=zohomail.com; s=zohoarc; b=ZqnC9hdxxT5mts4QfBy8R2pjKCpWuOgTJBnzlcBWVwTEQ7Nd0vHzGENb66gUN/3rsG2bo4FowWuZ6NGpSmhljxYxZRA6ciyVemvt9tmY3X53xyDzokH/qIwFUqERKV87w1Hg8aAgLexTsbS2klwzsvBaQ6JaiyqJ9kPc9SJm4c4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605252798; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=8HZQfEUpK1yPSZwZfRaQbUEGw4m+v5O2WJGSi+a6P98=; b=OmbZe/7fM641pYPgsbJe0mvf34+M7omxzbKetkdZasfZl5uR1M+T+2sbdL0b6aIQGKC+hgqUhdXnrtIt3IVnA7RxGwkqWzxPpUr0Q9kxpFk1tshNdEB1F5HhXRnZDXeD1YI4R47RY1yP55qEDIAVGUuDOBrJbFjS18zMFGZiaH8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67517+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1605252798091507.60372506563226; Thu, 12 Nov 2020 23:33:18 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id LnBZYY1788612xV2G7xnQm43; Thu, 12 Nov 2020 23:33:17 -0800 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.1211.1605252791949364648 for ; Thu, 12 Nov 2020 23:33:12 -0800 IronPort-SDR: TdQZReQJyLqKm3n2AY2ItWgtY7s7/IqxQerACSPjVn1MXkROjvnfstQ9ieoYv9RWHiJOYcUMgD 3lXfNsQ2hnIQ== X-IronPort-AV: E=McAfee;i="6000,8403,9803"; a="167858008" X-IronPort-AV: E=Sophos;i="5.77,474,1596524400"; d="scan'208";a="167858008" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 23:33:09 -0800 IronPort-SDR: m25QvBshKV6DlNHybk8qnJxRPZB5ke9mx17KBMgdoEM/fXxZSINZp7Wt12miw9UuLBBjUjOo15 mrYs475mTuJQ== X-IronPort-AV: E=Sophos;i="5.77,474,1596524400"; d="scan'208";a="542571515" X-Received: from bob-desktop.ccr.corp.intel.com ([10.239.49.71]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 23:33:07 -0800 From: "Mingyue Liang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [edk2-devel] [PATCH V2] BaseTools: Resolve index out of range errors. Date: Fri, 13 Nov 2020 15:33:01 +0800 Message-Id: <20201113073301.1028-1-mingyuex.liang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,mingyuex.liang@intel.com X-Gm-Message-State: o7nY8dmXCVSWV85SklbhSoGfx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1605252797; bh=bq4QiL2KslCEAcyAIY59viTvJCTf+5yejOsNc/psDoA=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=XtGPWlVHxq9+1UnZ5jS83Vt/DQpjNOxekVq1r2UV51pkWVa+PuVNDF+y/r1y1ZgNDE+ 6otG7FG5sj4hUSCqLfbnk2f38uo9k8KxYD2L3irGpk70r8UNWriit6EemQK5c1F47l+oK FAn0DkW6FTxnVn5S1szjPdJLDrVhpiCMJWw= X-ZohoMail-DKIM: pass (identity @groups.io) This problem is generated by solving bz2972's patch, and the commit ID is 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb. This is a problem when updating the DEPs file. The code does not consider that there is only one line of content in the file, so the filter condition is added to prevent the index from exceeding the range. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Bob Feng Reviewed-by: Yuwei Chen --- V2=EF=BC=9A Change the title to make it clearer and more descriptive. =20 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools= /Source/Python/AutoGen/IncludesAutoGen.py index b06ef42573fd..5ec26eb98b42 100644 --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py @@ -291,7 +291,8 @@ ${END} targetitem =3D self.GetRealTarget(source_abs.strip(" :")) =20 targetitem +=3D ": " - targetitem +=3D lines[1] + if len(lines)>=3D2: + targetitem +=3D lines[1] newcontent.append(targetitem) newcontent.extend(lines[2:]) newcontent.append("\n") --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#67517): https://edk2.groups.io/g/devel/message/67517 Mute This Topic: https://groups.io/mt/78225295/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-