From d9ba76b489ea26de8551d32651c726ad992377b5 Mon Sep 17 00:00:00 2001 From: Fu Siyuan Date: Fri, 1 Apr 2016 13:14:49 +0800 Subject: [PATCH] NetworkPkg: Check pointer for NULL before use. Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- NetworkPkg/HttpBootDxe/HttpBootConfig.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/HttpBootDxe/HttpBootConfig.c b/NetworkPkg/HttpBootDxe/HttpBootConfig.c index e7dd5db4db..c47dddcee8 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootConfig.c +++ b/NetworkPkg/HttpBootDxe/HttpBootConfig.c @@ -554,6 +554,10 @@ HttpBootFormCallback ( // Get user input URI string // Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL); + ASSERT (Uri != NULL); + if (Uri == NULL) { + return EFI_UNSUPPORTED; + } // // Convert the scheme to all lower case.