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.31; helo=mga06.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 827E92034B421 for ; Wed, 27 Dec 2017 18:33:34 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2017 18:38:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,468,1508828400"; d="scan'208";a="6081038" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.35]) by orsmga008.jf.intel.com with ESMTP; 27 Dec 2017 18:38:30 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Date: Thu, 28 Dec 2017 10:38:26 +0800 Message-Id: <20171228023828.18752-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [PATCH v2 0/2] Fix error in PrintLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2017 02:33:35 -0000 > v2: > a. Correct incorrect description in commit log > b. Fix another similar issue in the same function > c. Fix similar issues in MdeModulePkg/DxePrintLibPrint2Protocol Due to a potential hole in the stop condition of the loop, the two continuous access to ArgumentString (index, index+1) inside the loop might cause the string ending character ('\0') and the byte after it to be read. Jian J Wang (2): MdePkg/BasePrintLib: Fix error in Precision position calculation MdeModulePkg/DxePrintLibPrint2Protocol: Fix potential string over read MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c | 7 +++++-- MdePkg/Library/BasePrintLib/PrintLibInternal.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) -- 2.15.1.windows.2