ocvalidate: Move UEFI Driver '#' check to the correct place

This commit is contained in:
PMheart 2021-01-11 11:09:01 +08:00 committed by vit9696
parent b743c4635f
commit 132baab25d
2 changed files with 4 additions and 7 deletions

View File

@ -220,13 +220,6 @@ AsciiUefiDriverIsLegal (
DriverLength = AsciiStrLen (Driver);
for (Index = 0; Index < DriverLength; ++Index) {
//
// NOTE: Skip '#' as it is treated as comments and thus is legal.
//
if (Driver[0] == '#') {
continue;
}
//
// Skip allowed characters (0-9, A-Z, a-z, '_', '-', '.', '/').
//

View File

@ -209,6 +209,10 @@ CheckUEFIDrivers (
for (Index = 0; Index < UserUefi->Drivers.Count; ++Index) {
Driver = OC_BLOB_GET (UserUefi->Drivers.Values[Index]);
if (Driver[0] == '#') {
continue;
}
//
// Sanitise strings.
//