mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
[BOOTLIB] Fix 64 bit issues (#433)
This commit is contained in:
parent
8bbbab534a
commit
3be4081607
18 changed files with 85 additions and 58 deletions
|
@ -61,7 +61,7 @@ DsppLoadFontFile (
|
|||
{
|
||||
PBL_DEVICE_DESCRIPTOR FontDevice;
|
||||
NTSTATUS Status;
|
||||
ULONG NameLength, DirectoryLength, TotalLength;
|
||||
SIZE_T NameLength, DirectoryLength, TotalLength;
|
||||
PWCHAR FontPath, FontDirectory;
|
||||
BL_LIBRARY_PARAMETERS LibraryParameters;
|
||||
BOOLEAN CustomDirectory, CustomDevice;
|
||||
|
@ -114,21 +114,21 @@ DsppLoadFontFile (
|
|||
DirectoryLength = wcslen(FontDirectory);
|
||||
|
||||
/* Safely add them up*/
|
||||
Status = RtlULongAdd(NameLength, DirectoryLength, &TotalLength);
|
||||
Status = RtlSIZETAdd(NameLength, DirectoryLength, &TotalLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
/* Convert to bytes */
|
||||
Status = RtlULongLongToULong(TotalLength * sizeof(WCHAR), &TotalLength);
|
||||
Status = RtlSIZETMult(TotalLength, sizeof(WCHAR), &TotalLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
/* Add a terminating NUL */
|
||||
Status = RtlULongAdd(TotalLength, sizeof(UNICODE_NULL), &TotalLength);
|
||||
Status = RtlSIZETAdd(TotalLength, sizeof(UNICODE_NULL), &TotalLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
goto Quickie;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue