From nobody Wed Dec 25 01:20:03 2024 Delivered-To: importer@patchew.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 1509698250331439.0012028426037; Fri, 3 Nov 2017 01:37:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D935F202E5E59; Fri, 3 Nov 2017 01:33:33 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0049.outbound.protection.outlook.com [104.47.42.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EA97D202E5E4C for ; Fri, 3 Nov 2017 01:33:30 -0700 (PDT) Received: from MWHPR03CA0036.namprd03.prod.outlook.com (10.174.173.153) by CO2PR03MB2358.namprd03.prod.outlook.com (10.166.93.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Fri, 3 Nov 2017 08:37:24 +0000 Received: from BY2FFO11FD029.protection.gbl (2a01:111:f400:7c0c::111) by MWHPR03CA0036.outlook.office365.com (2603:10b6:301:3b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.197.13 via Frontend Transport; Fri, 3 Nov 2017 08:37:24 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD029.mail.protection.outlook.com (10.1.14.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.178.5 via Frontend Transport; Fri, 3 Nov 2017 08:37:24 +0000 Received: from uefi-OptiPlex-790.ap.freescale.net ([10.232.132.56]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vA38bKcn002276; Fri, 3 Nov 2017 01:37:20 -0700 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.42.49; helo=nam03-by2-obe.outbound.protection.outlook.com; envelope-from=vabhav.sharma@nxp.com; receiver=edk2-devel@lists.01.org Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; From: Vabhav To: , , Date: Fri, 3 Nov 2017 19:56:32 +0530 Message-ID: <1509719192-16582-1-git-send-email-vabhav.sharma@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131541718448377403; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(376002)(39860400002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(68736007)(2201001)(86362001)(81166006)(4326008)(81156014)(8676002)(53936002)(8936002)(498600001)(77096006)(110136005)(2906002)(50466002)(48376002)(54906003)(47776003)(5660300001)(50226002)(16586007)(305945005)(316002)(104016004)(5003940100001)(189998001)(50986999)(8656006)(97736004)(6666003)(33646002)(85426001)(105606002)(356003)(106466001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2358; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD029; 1:BbS2vM9upxW7mdD1zDww31eHjCwDO+9ymaWRGNX2+mUP+v3T44nwtnHyzP4ci2lVH2R4iuEHEet+abK89RGKTIiKsvvA2yvj/BXa5TPAv6Rgfpda2v6u1bHOW+LvV4Jj MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73ca30db-8776-4ada-21d2-08d522961ba4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:CO2PR03MB2358; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 3:tLZaDoJKQzBnFvZS3eaxfF6frQny4n7d0mO4fO7uT99yR3IGDdKdVfBQ7YVoXk6eoQJ181BsEGxflYA1K5HYcFAlxaimXBz3DKupP1INhC4+Wb5/YWGI0Dz+UkHuucjnZeq++wFKwEZwKwW8BMpWH8Vjz+rV8u2yHemm7GEXmW02IXNAIUhVWrpHOqJGZe3lWU7UQofnYuzLG73TZt0trLLGq6Dg6PFzbWls+YXioNqN8jm4J3iLzcntSLsZ4Ah/ZZt4iRMEIQsR9Vz1zk4jEQ7NZc+MPxGPS1YOBtK8ZT+gqEsM1PqUtnwCzdQEw4lsEJFqGGlKjWOR2lQsYTPjlR2tdlV76A1YJtkm0RF7PjY=; 25:Dbr5xnScUY67saQxGl4DHYwO1StuIBiGq5K5/0dZtXhhkpl4z7AH3Nw6uEArBzxPvgs7/4FY5/gFMsSmJ1FSCbExE4qQ+giIDMxrl5LShi8kgk4o0dTluGJVY5nK1FJyflG9qbs3qT9+ndDcV1ib4seMDR8iw5+xJAoX4eyUJiwEg6ZUewaApnAR8UPCiDTfKQ2JPX/aY9ZuviAng1QLVmyuf1MKIhV/Uwtmdm3uAgkH5K6vKv1z2ylX4Iq9rbaSWJ258DL0NkrjOLv8Rdd2EIRGqlNo1/ja3SoEr85+E+aeQJfh1gmiGkLqvqzagvD7P8hUk2sot/+VgZtRDlLWzA== X-MS-TrafficTypeDiagnostic: CO2PR03MB2358: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 31:6ro+OMHyyxgGmcEzG5jPg5W+JcbpX2W/yBRDhwK8166wpNFqTF2YsovhffAcGpc/RV7STbG7+rsQxsklCiiLdVmUEoDBl2Bbo2eibefZqZtBfBV+APf2lhqFDlosfQKFD/DPb55C7IUMBagFlSRCtMR6x6+PtdMV5JjOSm3zo0+gPUtUsQLAbuuT2t1RQ4ZCqQ6ed0T9MnW/9+yt/ONHNrB+b4Jw8ReTFt7+OaJd2Ag=; 4:OJOnnUp5b+SYFC1lXcDkTGxL4GPkj2/o+K6toa5aYMTiiN5J0dKNIOExFbDo+3gLlm4uF7ITcXuAcuADOnqJds0f37Mpr6QDZfjyEDi5guIKezCRmBWHy0FtFJdMMrv1NxtTBqZgzK6lN0K7kHcyjOLED9RlsaW04Dq14pdJnmJJiq7IdBwMi5dETvMpA0j/V4cpRx5bfrnMeWMKbWVUKubClMvYLMA+PjjsByRfcFJ7m2sxP7t7roFOm9gxTJ+ET7iRiFkI+wioRa639izm7RI+MMLsyX/uUj6qlVDQ4YtJcDk+c03DmT2AU2RFnMb0 X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231021)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123561025)(20161123565025)(20161123559100)(20161123556025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2358; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2358; X-Forefront-PRVS: 0480A51D4A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2358; 23:+Ee+MC4YrBdPzmBBcXuFBcSarFo7uy2SzBdDLaBYT?= =?us-ascii?Q?WWNDMnasKlVae3zHGIPrL7rlAbubYLFs4H1as7a+CzS7dwdZ2ETxL9hongdg?= =?us-ascii?Q?e8VvL++5C5ZLM6EfRSK6VkuCYF/17DKoyHZrvK5k+dVJXlut0n6XsvYyInjD?= =?us-ascii?Q?1xpw9xShcc3Z54NCrausdyxSmTgAYjVCnUSdF5k2qgO/SYvXy5G/XbB7Jmih?= =?us-ascii?Q?ZMoyZNxgwJ4OtYNdu/tP/DgjTBvrQ47183u8lczXWnPKVrToT2NyzSqswJYK?= =?us-ascii?Q?XIRFnYvi2ebYZNA/RZtUuP07eIpaHntTu1DehNEcIiXTtXLjBXuuJ2x5nocp?= =?us-ascii?Q?0DDhLKwRIu+rgXhT7enPClJePhvaykwNKs6GmRr5ffFb5+pNwn5Nx6Mo7xxK?= =?us-ascii?Q?i6F8UnAulh2QVqLpBxi/iydV3BosXWocx0DIDCJnPhS1GnA1f8Mi4nc8Hp3C?= =?us-ascii?Q?BRfE90rtnM0E23ETwYO3ElQQEEkcNWECj1WSF2TNlS+WoLnjL4zM/N3c7WRv?= =?us-ascii?Q?6VrLO7mQjLSx2RwJ0akGP0OOlIUmZoSODI1+8TvQocAcSaTzOWYaBCqgkK8x?= =?us-ascii?Q?aOsLV2scxnhQ96E7tW1iqAkzTQnsO5pJYM26f3Y5kESId1TDsrkMDMVvYTdK?= =?us-ascii?Q?XAfWu0yjdhILBJkmiCMCBTAmtlKVN87rPwSCiX7SIfiFk1JHXoCl5jaoG8nw?= =?us-ascii?Q?ZTYtEd5nkCtBDf7QhpY4Jq9/apMW8EZ+7a16c0tPmbbJ3KpcN+Mm0v+KjG7F?= =?us-ascii?Q?WUT5hBZuX0uu3/ocVAlYxT8NPbodTtaylG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J1QhQG2OdNZiWjtVnVdqMhVCQtTNgimHbb3yPmJqEnc2e9mTfu4fTaMhRvdZ10=; 7:GTtENKNic6kWZ8Vwqz5EcTyKLpXpZx3/Il46/7FR//T0+FF6mPPAmQTmwjmdk5Qf+M3O4H3YOoknlbInqAIvQKzpLgLAYFcP6qHdWELnUcPSsuanNuUkHKjJvPq4ame+L/9jdynS6z9XU3evQcNQTfCqqfSe4IaFtpsm43hT8hLGpz41eZsM6IVFiYK+fDWLEcF0WgEjCo9EwN0Zdjdc23/0HdjEGdHtw1gzaVKoP0nxIUPyXOI4GkrqWj/VsPJn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 08:37:24.4945 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73ca30db-8776-4ada-21d2-08d522961ba4 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2358 Subject: [edk2] [PATCH] Tftp assert fix for openfile failure case 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: , Cc: ting.ye@intel.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, siyuan.fu@intel.com 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" Issue: when file open is failed, assert was seen due to freeing 0 size page Reason: DataSize is remain zero if error is reported in ShellOpenFileByName Fix: Update DataSize as soon as FileSize is available Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar Signed-off-by: Vabhav --- ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c b/ShellPkg/Lib= rary/UefiShellTftpCommandLib/Tftp.c index fbde3bf..6425fc5 100755 --- a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c +++ b/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c @@ -509,6 +509,7 @@ ShellCommandRunTftp ( ); goto NextHandle; } + DataSize =3D FileSize; =20 Status =3D DownloadFile (Mtftp4, RemoteFilePath, AsciiRemoteFilePath, = FileSize, BlockSize, &Data); if (EFI_ERROR (Status)) { @@ -539,7 +540,6 @@ ShellCommandRunTftp ( goto NextHandle; } =20 - DataSize =3D FileSize; Status =3D ShellWriteFile (FileHandle, &FileSize, Data); if (!EFI_ERROR (Status)) { ShellStatus =3D SHELL_SUCCESS; --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel