From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from atlmailgw1.ami.com (atlmailgw1.ami.com [63.147.10.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8F52221E1DADB for ; Wed, 2 Aug 2017 10:51:33 -0700 (PDT) X-AuditID: ac1060b2-099ff70000000ee1-59-598211a7f89d Received: from atlms2.us.megatrends.com (atlms2.us.megatrends.com [172.16.96.152]) (using TLS with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id A3.C7.03809.7A112895; Wed, 2 Aug 2017 13:53:43 -0400 (EDT) Received: from ATLMS1.us.megatrends.com ([fe80::8c55:daf0:ef05:5605]) by atlms2.us.megatrends.com ([fe80::29dc:a91e:ea0c:cdeb%12]) with mapi id 14.03.0123.003; Wed, 2 Aug 2017 13:53:42 -0400 From: Felix Poludov To: "Kinney, Michael D" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] staging/edk2-test: TestProfile bug fix Thread-Index: AdMLliB1oQjf9HLxQm2/4t1/wUUYRAAH71FwAACACYA= Date: Wed, 2 Aug 2017 17:53:41 +0000 Message-ID: <9333E191E0D52B4999CE63A99BA663A00302B3963D@atlms1.us.megatrends.com> References: <9333E191E0D52B4999CE63A99BA663A00302B394D6@atlms1.us.megatrends.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.99.93] content-transfer-encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42JZI5AwQ3e5YFOkwa2JshZ7Dh1ltujo+Mfk wOSxeM9LJo/u2f9YApiiGhhtEvPy8ksSS1IVUlKLk22VAooyyxKTK5UUMlNslQyVFApyEpNT c1PzSmyVEgsKUvNSlOy4FDCADVBZZp5Cal5yfkpmXrqtkmewv66FhamlrqGSXUhGqkJmXlp+ UW5iSWZ+nkJyfl4JUHVqClBUIaGLM2Pa/j1sBS8kKrZeWMnYwLhLpIuRk0NCwETi541nzF2M XBxCAtuZJCb+XcYGkhASOMQo8eUVmM0moCKx6ewFZhBbRCBbYsKHrewgtrCAtcS1b2eB4hxA cRuJV2/9IUqsJO7OmcEEYrMAte66P5MVxOYVCJQ48WkV1K7ZjBJvGi6DFXEKhEi8enIZbD6j gJjE91NrwOLMAuISt57MZ4I4VEBiyZ7zzBC2qMTLx/9YIWwFiS3vO9kh6nUkFuz+xAZha0ss W/iaGWKxoMTJmU9YJjCKzEIydhaSlllIWmYhaVnAyLKKUSixJCc3MTMnvdxQLzE3Uy85P3cT IyTyN+1gbLlofohRgINRiYf30JfGSCHWxLLiylxg6HEwK4nwnmVtihTiTUmsrEotyo8vKs1J LT7E6AQMl4nMUtygKALGebyxgYGUKIxjaGJmYm5kbmhpYm5srCTO69MQHikkkA5MO9mpqQWp RTBDmDg4pRoYA3kKff696BU2FtumMmHH1Yte90Q8unS3r5T8Vbjq3ynLW3ZK3W0+5vo5F+W2 Tny98O+DpwFM/4qKz5Wv9n9nOp+bY97XFzOsmirFNC4JRHNFCMZ+SzHWOf557ncdX6VfGc8W mHR3FZzbvaYsdNlDkcPP/JarbM/tObR0ggL3AmE+U+fjrMoVSizFGYmGWsxFxYkAk17RVB8D AAA= Subject: Re: [PATCH] staging/edk2-test: TestProfile bug fix X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 17:51:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" 1. Build the project in debug mode so that asserts are visible. 2. Run "sct -u" command and use SCT GUI to create a sequence file. 3. Run "sct -s " command, where is= a name of the sequence file created in step 2. The assert is happening during SCT startup when sequence file is parsed. -----Original Message----- From: Kinney, Michael D [mailto:michael.d.kinney@intel.com] Sent: Wednesday, August 02, 2017 1:37 PM To: Felix Poludov; edk2-devel@lists.01.org; Kinney, Michael D Subject: RE: [PATCH] staging/edk2-test: TestProfile bug fix Hi Felix, Thanks for the contribution. Do you have a test case that reproduces the issue you found? Thanks, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Felix Poludov > Sent: Wednesday, August 2, 2017 6:54 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH] staging/edk2-test: TestProfile bug fix > > The patch is a bug fix for TestFrameworkPkg/Support/TestProfile > driver. > AsciiStrCpy function was used to copy overlapping strings, which > triggered an ASSERT. > > The function was used on overlapping strings in a couple of > places: > 1. _alltrim: AsciiStrCpy is replaced with CopyMem, which can handle > overlapping buffers 2. _prosessLine: AsciiStrCpy at the beginning of > the function is removed. > The call was redundant. The function was trying to move the data that > have already been moved by _alltrim. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Felix Polyudov > --- > > diff --git a/TestFrameworkPkg/Support/TestProfile/TestProfile.c > b/TestFrameworkPkg/Support/TestProfile/TestProfile.c > index f02e9df..3f0e0d5 100644 > --- a/TestFrameworkPkg/Support/TestProfile/TestProfile.c > +++ b/TestFrameworkPkg/Support/TestProfile/TestProfile.c > @@ -269,7 +269,7 @@ Routine Description: > } > tmp[Index] =3D '\0'; > - AsciiStrCpy (ptrStr, tmp); > + CopyMem(ptrStr, tmp, Index+1); > return ptrStr; > } > @@ -419,7 +419,7 @@ Routine Description: > CHAR8 ptrValue[MAX_STRING_LEN + 1]; > INI *ptrItem; > - AsciiStrCpy (ptrLine, _alltrim (ptrLine)); > + _alltrim (ptrLine); > if (*ptrLine =3D=3D '#') { > // it's a comment line > > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and > proprietary to American Megatrends, Inc. This communication is > intended to be read only by the individual or entity to whom it is > addressed or by their designee. If the reader of this message is not > the intended recipient, you are on notice that any distribution of > this message, in any form, is strictly prohibited. Please promptly > notify the sender by reply e-mail or by telephone at 770-246-8600, and > then delete or destroy all copies of the transmission. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel Please consider the environment before printing this email. The information contained in this message may be confidential and proprietar= y to American Megatrends, Inc. This communication is intended to be read on= ly by the individual or entity to whom it is addressed or by their designee.= If the reader of this message is not the intended recipient, you are on not= ice that any distribution of this message, in any form, is strictly prohibit= ed. Please promptly notify the sender by reply e-mail or by telephone at 77= 0-246-8600, and then delete or destroy all copies of the transmission.