ShellPkg/HttpDynamicCommand: Fix possible uninitialized use
`Status` can be used uninitialized:
/* Evaluates to FALSE */
if (ShellGetExecutionBreakFlag ()) {
Status = EFI_ABORTED;
break;
}
/* Evaluates to FALSE */
if (!Context->ContentDownloaded && !Context->ResponseToken.Event) {
Status = ...;
ASSERT_EFI_ERROR (Status);
} else {
ResponseMessage.Data.Response = NULL;
}
/* UNINITIALIZED USE */
if (EFI_ERROR (Status)) {
break;
}
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Sergei Dmitrouk <sergei@posteo.net>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
42ec0a315b
commit
aecfbc81a9
@@ -1524,6 +1524,7 @@ GetResponse (
|
||||
Context->ResponseToken.Message = &ResponseMessage;
|
||||
Context->ContentLength = 0;
|
||||
Context->Status = REQ_OK;
|
||||
Status = EFI_SUCCESS;
|
||||
MsgParser = NULL;
|
||||
ResponseData.StatusCode = HTTP_STATUS_UNSUPPORTED_STATUS;
|
||||
ResponseMessage.Data.Response = &ResponseData;
|
||||
|
||||
Reference in New Issue
Block a user