public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Eric Dong <eric.dong@intel.com>,
	Feng Tian <feng.tian@intel.com>
Subject: [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL
Date: Mon, 21 Nov 2016 15:52:14 +0800	[thread overview]
Message-ID: <1479714734-8604-1-git-send-email-hao.a.wu@intel.com> (raw)

Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by
CopyMem().

Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
index e333b55..76b25a3 100644
--- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
+++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
@@ -1435,6 +1435,8 @@ TcgGetNextTcgUid(
     return TcgResultFailure;
   }
 
+  ASSERT (ByteSeq != NULL);
+
   CopyMem(Uid, ByteSeq, sizeof(TCG_UID));
 
   return TcgResultSuccess;
-- 
1.9.5.msysgit.0



             reply	other threads:[~2016-11-21  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21  7:52 Hao Wu [this message]
2016-11-21  7:57 ` [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479714734-8604-1-git-send-email-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox