summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2022-11-08 15:29:05 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-03 15:29:08 +0000
commit321240b135e37ac1b9be1317f78ce2a3b526bf02 (patch)
tree7a88a6e299ccc00048b1d6f1e6e7a53eb49e7355 /NetworkPkg
parent07251f3c6a9aff09eb2778f8d5db51348fca8e18 (diff)
downloadedk2-321240b135e37ac1b9be1317f78ce2a3b526bf02.tar.gz
edk2-321240b135e37ac1b9be1317f78ce2a3b526bf02.tar.bz2
edk2-321240b135e37ac1b9be1317f78ce2a3b526bf02.zip
MdePkg: Fix conditionally uninitialized variables
Fixes CodeQL alerts for CWE-457: https://cwe.mitre.org/data/definitions/457.html Note that this change affects the actual return value from the following functions. The functions documented that if an integer overflow occurred, MAX_UINTN would be returned. They were implemented to actually return an undefined value from the stack. This change makes the function follow its description. However, this is technically different than what callers may have previously expected. MdePkg/Library/BaseLib/String.c: - StrDecimalToUintn() - StrDecimalToUint64() - StrHexToUintn() - StrHexToUint64() - AsciiStrDecimalToUintn() - AsciiStrDecimalToUint64() - AsciiStrHexToUintn() - AsciiStrHexToUint64() Cc: Erich McMillan <emcmillan@microsoft.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Co-authored-by: Erich McMillan <emcmillan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
Diffstat (limited to 'NetworkPkg')
0 files changed, 0 insertions, 0 deletions