projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[freeldr] Never suppose that buffer in UNICODE_STRING is null terminated. Fixes some...
[reactos.git]
/
reactos
/
boot
/
freeldr
/
freeldr
/
windows
/
winldr.c
diff --git
a/reactos/boot/freeldr/freeldr/windows/winldr.c
b/reactos/boot/freeldr/freeldr/windows/winldr.c
index
4ba7b1b
..
f3f7cd1
100644
(file)
--- a/
reactos/boot/freeldr/freeldr/windows/winldr.c
+++ b/
reactos/boot/freeldr/freeldr/windows/winldr.c
@@
-232,7
+232,7
@@
WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
PVOID DriverBase;
// Separate the path to file name and directory path
PVOID DriverBase;
// Separate the path to file name and directory path
- s
printf(DriverPath, "%S", FilePath->Buffer
);
+ s
nprintf(DriverPath, sizeof(DriverPath), "%wZ", FilePath
);
DriverNamePos = strrchr(DriverPath, '\\');
if (DriverNamePos != NULL)
{
DriverNamePos = strrchr(DriverPath, '\\');
if (DriverNamePos != NULL)
{
@@
-261,7
+261,7
@@
WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
}
// It's not loaded, we have to load it
}
// It's not loaded, we have to load it
- s
printf(FullPath,"%s%S", BootPath, FilePath->Buffer
);
+ s
nprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath
);
Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase);
if (!Status)
return FALSE;
Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase);
if (!Status)
return FALSE;