From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 115EF1A1DFF for ; Wed, 12 Oct 2016 07:14:10 -0700 (PDT) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A4DA31B329; Wed, 12 Oct 2016 14:14:09 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-92.phx2.redhat.com [10.3.116.92]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9CEE70U005702; Wed, 12 Oct 2016 10:14:08 -0400 To: Eric Dong , edk2-devel@ml01.01.org, michael.d.kinney@intel.com, liming.gao@intel.com References: <1476275967-10888-1-git-send-email-eric.dong@intel.com> From: Laszlo Ersek Message-ID: <44d8c0c5-7387-e85f-0e62-b66cf2410485@redhat.com> Date: Wed, 12 Oct 2016 16:14:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1476275967-10888-1-git-send-email-eric.dong@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 12 Oct 2016 14:14:09 +0000 (UTC) Subject: Re: [Patch 0/2] MdePkg DevicePathLib: Check buffer length before use. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 14:14:10 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 10/12/16 14:39, Eric Dong wrote: > In IsDevicePathValid API, code should validate the device path > buffer not exceed the input MaxSize before reference the path > info. This patched series add this check. > > Eric Dong (2): > MdePkg UefiDevicePathLib: Validate buffer length before use buffer. > MdePkg UefiDevicePathLibDevicePathProtocol: Validate before use. > > .../UefiDevicePathLib/DevicePathUtilities.c | 25 ++++++++++++++++------ > .../UefiDevicePathLib.c | 24 +++++++++++++++------ > 2 files changed, 35 insertions(+), 14 deletions(-) > Just a syntactic remark: you don't need the backslash (\) after the trailing logical-and (&&) operators. Thanks Laszlo