From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 ADA3D210DF76C for ; Mon, 2 Jul 2018 19:02:26 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 19:02:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,301,1526367600"; d="scan'208";a="71791250" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.4]) ([10.239.9.4]) by orsmga002.jf.intel.com with ESMTP; 02 Jul 2018 19:02:10 -0700 To: "Zeng, Star" , "edk2-devel@lists.01.org" Cc: "Kinney, Michael D" References: <20180625073658.212076-1-ruiyu.ni@intel.com> <20180625073658.212076-3-ruiyu.ni@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BB609B4@shsmsx102.ccr.corp.intel.com> From: "Ni, Ruiyu" Message-ID: <12c5b766-09bd-998e-ac1f-74741bf75f33@Intel.com> Date: Tue, 3 Jul 2018 10:02:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BB609B4@shsmsx102.ccr.corp.intel.com> Subject: Re: [PATCH 2/2] MdeModulePkg/BmpSupportLib: Check PixelHeight/PixelWidth against 0 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 02:02:26 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 7/2/2018 6:05 PM, Zeng, Star wrote: > Please add reference to bugzilla link into the commit log. > > https://bugzilla.tianocore.org/show_bug.cgi?id=944 OK > > Another, is there any reason to only add debug message for " if ((BmpHeader->PixelHeight == 0) || (BmpHeader->PixelWidth == 0)) { ", but not " if ((PixelHeight == 0) || (PixelWidth == 0)) { " ??? PixelHeight and PixelWidth are passed in from caller directly. But when caller passes in BmpImage buffer, it doesn't know the format of the BMP header, so a debug message is shown to tell caller what happens. -- Thanks, Ray