PVOID DriverBase;
// Separate the path to file name and directory path
- sprintf(DriverPath, "%S", FilePath->Buffer);
+ snprintf(DriverPath, sizeof(DriverPath), "%wZ", FilePath);
DriverNamePos = strrchr(DriverPath, '\\');
if (DriverNamePos != NULL)
{
}
// It's not loaded, we have to load it
- sprintf(FullPath,"%s%S", BootPath, FilePath->Buffer);
+ snprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath);
Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase);
if (!Status)
return FALSE;