Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X64 boot fixes #115

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ntoskrnl/fsrtl/unc.c
Expand Up @@ -71,7 +71,7 @@ FsRtlpIsDfsEnabled(VOID)
return TRUE;
}

return ((ULONG)KeyQueryOutput.KeyInfo.Data != 1);
return ((ULONG)KeyQueryOutput.KeyInfo.Data[0] != 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data is UCHAR Data[1];, so it would need to be either return (*(PULONG)KeyQueryOutput.KeyInfo.Data != 1); or fix the structure definition above to be something like union { KEY_VALUE_PARTIAL_INFORMATION KeyInfo; struct { ULONG Header[3]; ULONG KeyValue; } } KeyQueryOutput; and return (KeyQueryOutput.KeyValue != 0); or struct KEY_VALUE_PARTIAL_INFORMATION KeyInfo; UCHAR Fill[3];} and PULONG KeyValue = (PULONG)KeyQueryOutput.KeyInfo.Data; return (*KeyValue != 1);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I see. There are some nasty little things going on here. Well, okay, will do first option. But on little-endian machine my option will work too (BTW, is PPC port still in game?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a portable construct would be nice in any case. Because digging each time in the code to check whether the thing will work when you switch the endianness is a pain.

}

NTSTATUS
Expand Down