From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=68.232.153.95; helo=esa5.dell-outbound.iphmx.com; envelope-from=jim.dailey@dell.com; receiver=edk2-devel@lists.01.org Received: from esa5.dell-outbound.iphmx.com (esa5.dell-outbound.iphmx.com [68.232.153.95]) (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 B113021A09130 for ; Mon, 3 Dec 2018 14:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1543874722; x=1575410722; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lttvXCoJ0weZbjNgzR0KnpDLaLeOQWMjZpAlBO7PIv8=; b=VgzTIQA0TjQs0Az7dYm7oJwdJvUkXZFynd2lvcP6FJM4uamn7KwNw2LJ q/4vWbhfX8FQB9mFzJT5a5UgTSJjX8J3w6ZnfXXGLmXq68WUpdRG6KB12 epwiALcjvSgR95XGSXp5CUH5bs0nTBcdiC93eyLgOlPdCYNJuprH+xZ+f Q=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EDAABDpwVchyeV50NjGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUQUBAQEBCwGCaXASJwqMB1+NO5IvIIR6FIFmCwEBGAsLhD4?= =?us-ascii?q?Cg2o0CQ0BAwEBAgEBAgEBAhABAQEKCwkIKSMMgjYiEoELAQEBAQEBAQEBTQI?= =?us-ascii?q?NYwEBAQEDAQEQKDQLDAQCAQgRBAEBHwkHJwEeCQgBAQQBDQUIGoJ/AYIBD5o?= =?us-ascii?q?APQKBEIlYAQEBgh2KJwWCLowEg241gx4BBIEnBAESAYV6AokslxQHAocAhh6?= =?us-ascii?q?EFiCBW4URijqJBIRlil0CBAIEBQIUgUaBHXFwUIJsgjWIZ4U/QAExAYkTDxe?= =?us-ascii?q?BCIEfAQE?= X-IPAS-Result: =?us-ascii?q?A2EDAABDpwVchyeV50NjGgEBAQEBAgEBAQEHAgEBAQGBU?= =?us-ascii?q?QUBAQEBCwGCaXASJwqMB1+NO5IvIIR6FIFmCwEBGAsLhD4Cg2o0CQ0BAwEBA?= =?us-ascii?q?gEBAgEBAhABAQEKCwkIKSMMgjYiEoELAQEBAQEBAQEBTQINYwEBAQEDAQEQK?= =?us-ascii?q?DQLDAQCAQgRBAEBHwkHJwEeCQgBAQQBDQUIGoJ/AYIBD5oAPQKBEIlYAQEBg?= =?us-ascii?q?h2KJwWCLowEg241gx4BBIEnBAESAYV6AokslxQHAocAhh6EFiCBW4URijqJB?= =?us-ascii?q?IRlil0CBAIEBQIUgUaBHXFwUIJsgjWIZ4U/QAExAYkTDxeBCIEfAQE?= Received: from mx0a-00154901.pphosted.com (HELO mx0b-00154901.pphosted.com) ([67.231.149.39]) by esa5.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Dec 2018 16:05:21 -0600 Received: from pps.filterd (m0090350.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wB3M30kF109742 for ; Mon, 3 Dec 2018 17:06:08 -0500 Received: from esa1.dell-outbound2.iphmx.com (esa1.dell-outbound2.iphmx.com [68.232.153.201]) by mx0b-00154901.pphosted.com with ESMTP id 2p5c4g88mq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 03 Dec 2018 17:06:08 -0500 From: Received: from ausxippc101.us.dell.com ([143.166.85.207]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 04 Dec 2018 04:06:08 +0600 X-LoopCount0: from 10.166.136.217 X-IronPort-AV: E=Sophos;i="5.56,311,1539666000"; d="scan'208";a="1168379173" To: , CC: Thread-Topic: [PATCH] MdePkg-BaseLib: PathCleanUpDirectories fix Thread-Index: AdSIvm+Qf7WXTWr+SCODCcTYAgn9iAAAVWcwAKBwmDA= Date: Mon, 3 Dec 2018 22:06:06 +0000 Message-ID: <0d1c0527e4b24d34b4d99a8fa3c18689@ausx13mps335.AMER.DELL.COM> References: <7a2851948cc24393879f9aa7318bffc6@ausx13mps335.AMER.DELL.COM> In-Reply-To: <7a2851948cc24393879f9aa7318bffc6@ausx13mps335.AMER.DELL.COM> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Jim_Dailey@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2018-11-30T15:03:58.7478991Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; Sensitivity=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-03_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812030198 Subject: Re: [PATCH] MdePkg-BaseLib: PathCleanUpDirectories fix X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2018 22:06:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming and Mike, I don't feel there is any logical issue with this proposed fix. However, there is some shell code that fails when the fix is in place. I think that shell code probably should be changed; I'll see if I can make an acceptable change there first. Please disregard this patch; I'll likely resubmit some version of it later on. Regards, Jim -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dail= ey, Jim Sent: Friday, November 30, 2018 9:43 AM To: liming.gao@intel.com; michael.d.kinney@intel.com Cc: edk2-devel@lists.01.org Subject: Re: [edk2] [PATCH] MdePkg-BaseLib: PathCleanUpDirectories fix [EXTERNAL EMAIL]=20 Oops! I think this change may have an issue. Hold off and I'll let you know if that's the case. --Jim -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dail= ey, Jim Sent: Friday, November 30, 2018 9:12 AM To: liming.gao@intel.com; michael.d.kinney@intel.com Cc: edk2-devel@lists.01.org Subject: [edk2] [PATCH] MdePkg-BaseLib: PathCleanUpDirectories fix PathCleanUpDirectories does not handle "\..\" properly; it returns "\" instead of "". This change fixes that problem so that "" is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jim Dailey --- MdePkg/Library/BaseLib/FilePaths.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseLib/FilePaths.c b/MdePkg/Library/BaseLib/Fi= lePaths.c index 92e4c350ff..69e46dd135 100644 --- a/MdePkg/Library/BaseLib/FilePaths.c +++ b/MdePkg/Library/BaseLib/FilePaths.c @@ -110,7 +110,12 @@ PathCleanUpDirectories( ((*(TempString + 3) =3D=3D L'\\') || (*(TempString + 3) =3D=3D CH= AR_NULL)) ) { *(TempString + 1) =3D CHAR_NULL; - PathRemoveLastItem(Path); + if (!PathRemoveLastItem(Path)) { + // + // We had "\.." + // + *Path =3D CHAR_NULL; + } if (*(TempString + 3) !=3D CHAR_NULL) { CopyMem (Path + StrLen (Path), TempString + 4, StrSize (TempString += 4)); } --=20 2.17.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel