Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: ee0084a071b9836cbea07c469483b5f0c10d6abf
https://github.com/tianocore/edk2/commit/ee0084a071b9836cbea07c469483b5f0c10d6abf
Author: Mingjie Shen <[email protected]>
Date: 2025-12-03 (Wed, 03 Dec 2025)
Changed paths:
M ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
Log Message:
-----------
ShellPkg/Mv: Harden and optimize trailing-slash trimming
- Remove redundant null check in IsValidMove() per CodeQL
cpp/redundant-null-check-simple. Specifically, drop the
"DestPathWalker != NULL" condition from the trimming loop.
Rationale: "DestPathCopy" is allocated at line 181 and checked for
NULL at lines 182–183; "DestPathWalker" is initialized from
"DestPathCopy" at line 186, so it cannot be NULL.
- Cache length once in IsValidMove() and ValidateAndMoveFiles() so the
trimming loop avoids repeated StrLen() calls.
- Guard the zero-length case before indexing the last character to
prevent out-of-bounds access.
Signed-off-by: Mingjie Shen <[email protected]>
Commit: 2b47c81fe6f723100ab2fa893a74b429fe8bbe7e
https://github.com/tianocore/edk2/commit/2b47c81fe6f723100ab2fa893a74b429fe8bbe7e
Author: Mingjie Shen <[email protected]>
Date: 2025-12-03 (Wed, 03 Dec 2025)
Changed paths:
M ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
Log Message:
-----------
ShellPkg/For: Remove redundant null/empty checks on ArgSetWalker
Fix CodeQL cpp/redundant-null-check-simple warning in
ShellPkg/Library/UefiShellLevel1CommandsLib/For.c at line 571 by
removing redundant null and empty-string checks on ArgSetWalker. The
outer guard at line 570 ensures that ArgSetWalker is non-NULL and
non-empty, so the inner condition only needs
ShellIsValidForNumber(ArgSetWalker).
Signed-off-by: Mingjie Shen <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/a058a2856dec...2b47c81fe6f7
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits