mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
NetworkPkg: Fix conditionally uninitialized variables
Fixes CodeQL alerts for CWE-457: https://cwe.mitre.org/data/definitions/457.html Cc: Erich McMillan <emcmillan@microsoft.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Co-authored-by: Erich McMillan <emcmillan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
This commit is contained in:
parent
321240b135
commit
3fab32d41d
@ -753,7 +753,7 @@ HttpUrlGetPort (
|
||||
|
||||
Status = AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **)NULL, &Data);
|
||||
|
||||
if (Data > HTTP_URI_PORT_MAX_NUM) {
|
||||
if (EFI_ERROR (Status) || (Data > HTTP_URI_PORT_MAX_NUM)) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
@ -1570,6 +1570,9 @@ TcpIcmpInput (
|
||||
BOOLEAN IcmpErrIsHard;
|
||||
BOOLEAN IcmpErrNotify;
|
||||
|
||||
IcmpErrIsHard = FALSE;
|
||||
IcmpErrNotify = FALSE;
|
||||
|
||||
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
|
||||
goto CLEAN_EXIT;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user