From nobody Sun Apr 28 23:47:17 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501682041236873.0831513802108; Wed, 2 Aug 2017 06:54:01 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2ED2821DF9661; Wed, 2 Aug 2017 06:51:48 -0700 (PDT) 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 4CF4D21D49C8E for ; Wed, 2 Aug 2017 06:51:46 -0700 (PDT) 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 C2.07.03809.379D1895; Wed, 2 Aug 2017 09:53:56 -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 09:53:55 -0400 X-Original-To: edk2-devel@lists.01.org X-AuditID: ac1060b2-099ff70000000ee1-c5-5981d9730198 From: Felix Poludov To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] staging/edk2-test: TestProfile bug fix Thread-Index: AdMLliB1oQjf9HLxQm2/4t1/wUUYRA== Date: Wed, 2 Aug 2017 13:53:54 +0000 Message-ID: <9333E191E0D52B4999CE63A99BA663A00302B394D6@atlms1.us.megatrends.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.99.93] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42JZI5AwQ7fkZmOkwYQJzBZ7Dh1ldmD06J79 jyWAMaqB0SYxLy+/JLEkVSEltTjZVimgKLMsMblSSSEzxVbJUEmhICcxOTU3Na/EVimxoCA1 L0XJjksBA9gAlWXmKaTmJeenZOal2yp5BvvrWliYWuoaKtmFZKQqZOal5RflJpZk5ucpJOfn lQBVp6YARRUSujgzmhZuYCloMKho/GHVwHhaq4uRk0NCwERiYUsbWxcjF4eQwHYmic/f3jND OIcYJdas3sYKUsUmoCKx6ewFZhBbRMBconX+FSYQWxjI3jDhGpDNARS3kXj11h+iRE/iz8X3 bCA2C1Dr5BtbWUBsXoFAifN7W8FGMgqISXw/tQZsDLOAuMStJ/OZIA4SkFiy5zwzhC0q8fLx P1YIW0Fiy/tOdoj6fIkXsxYzQswUlDg58wnLBEbBWUhGzUJSNgtJGURcS2Jf1w9mCFtbYtnC 11C2psSslU1MyOILGNlXMQolluTkJmbmpJcb6iXmZuol5+duYoTE+KYdjC0XzQ8xCnAwKvHw mu1pjBRiTSwrrswFhh4Hs5IIL8s1oBBvSmJlVWpRfnxRaU5q8SFGJ2CwTGSW4gbFEDDK440N DKREYRxDEzMTcyNzQ0sTc2NjJXFen4bwSCGBdGDSyU5NLUgtghnCxMEp1cAo/e/6f5GDfObN 7suSg+o9WK/K1KzrO3Kow3WD6PUJtjuLtf9edHEJfHBA1O1Yo57kVI752tXmd/cHaEw2X/9d aZ6a1hcRDsVHv/rXGc7s28d4N5XD+O6j0j0na6b93jt70fnEFrEEtg4/GxuO832iS/e2neSw m3u2Rv3iH6ZXbUti57PLRv1WYinOSDTUYi4qTgQAI+AmaRQDAAA= X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: [edk2] [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: , Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 overlap= ping 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/TestFrame= workPkg/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 proprieta= ry 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 design= ee. 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 pro= hibited. 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