HomeFreeBSD

libefivar: CodeQL Fixes

Description

libefivar: CodeQL Fixes

These libefivar files correspond to the following EDK2 Tianocore
routines:

efivar-dp-format.c -> MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
efivar-dp-parse.c -> MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c

The following changes were apparently applied upstream to appease their
CodeQL workflows on GitHub. Note that some of these changes are
logically contradictory, however avoiding differences between the two
code bases is a priority, as noted in the review.

Commit message from upstream:

Includes changes across the repo for the following CodeQL rules:

  • cpp/comparison-with-wider-type
  • cpp/overflow-buffer
  • cpp/redundant-null-check-param
  • cpp/uselesstest

Reviewed by: imp
Approved by: emaste (mentor)
Obtained from: https://github.com/tianocore/edk2/commit/b7735a087afce6a5157b61e5450b6848ed535a14
Differential Revision: https://reviews.freebsd.org/D49059

Details

Provenance
jlduranAuthored on Feb 20 2025, 8:10 PM
Reviewer
imp
Differential Revision
D49059: libefivar: CodeQL Fixes
Parents
rGb5f60442a03e: libefivar: Fix sed pattern
Branches
Unknown
Tags
Unknown