Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: a3fef3939952ccf387f94b5fb3f1a05f3a015463
https://github.com/tianocore/edk2/commit/a3fef3939952ccf387f94b5fb3f1a05f3a015463
Author: Michael Kubacki <[email protected]>
Date: 2025-11-24 (Mon, 24 Nov 2025)
Changed paths:
M MdeModulePkg/Universal/PCD/Dxe/Pcd.c
Log Message:
-----------
MdeModulePkg: Fix comparison with wider widths.
https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type
If the narrow type (smaller range) is compared against a wide type
(larger range), the narrow value may overflow before reaching the wide
value. This can cause unexpected behavior, such as:
Infinite loops (loop condition never becomes false).
Incorrect logic (comparison results are misleading).
Why is this casting instead of just changing the type?
Its because the compiler for IA32 will optimize by
inserting a 64bit multiply to dereference into the
array. This will be turned into an unresoled _allmul
that is trying to call into the msvc runtime library,
which doesn't exist.
Signed-off-by: Aaron Pop <[email protected]>
Co-authored-by: Michael Kubacki <[email protected]>
Co-authored-by: Taylor Beebe <[email protected]>
Co-authored-by: pohanch <[email protected]>
Co-authored-by: kenlautner <[email protected]>
Co-authored-by: Oliver Smith-Denny <[email protected]>
Co-authored-by: Sean Brogan <[email protected]>
Co-authored-by: Aaron <aaronpop@microsoft>
Commit: 242156cfb7353aba93e299fd7fdca6a1f8d8bcce
https://github.com/tianocore/edk2/commit/242156cfb7353aba93e299fd7fdca6a1f8d8bcce
Author: Michael Kubacki <[email protected]>
Date: 2025-11-24 (Mon, 24 Nov 2025)
Changed paths:
M MdeModulePkg/Universal/PCD/Dxe/Pcd.c
M MdeModulePkg/Universal/PCD/Dxe/Service.c
Log Message:
-----------
MdeModulePkg: Fix missing NULL tests.
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp
For items which allocate memory, or get a pointer from another
structure, it is important to validate that the pointers
are not null before they are dereferenced.
Signed-off-by: Aaron Pop <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/4f323d920f56...242156cfb735
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