Skip to content

Fix f_404 and f_405#898

Open
yosuke-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
yosuke-wolfssl:f_404_405
Open

Fix f_404 and f_405#898
yosuke-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
yosuke-wolfssl:f_404_405

Conversation

@yosuke-wolfssl
Copy link
Contributor

This PR is intended to fix the following things:

  • Change SetupUserTokenWin() to use DomainName.Length for DomainName.MaximumLength instead of UserPrincipalName.Length.
  • Change CheckPasswordWIN() to calculate usrWSz as wide character length properly.

@yosuke-wolfssl yosuke-wolfssl self-assigned this Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 02:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes two Windows-specific issues in wolfsshd authentication: correcting size calculations for username wide-string conversion and fixing an incorrect UNICODE_STRING.MaximumLength assignment when constructing S4U logon data for LSA.

Changes:

  • Fix CheckPasswordWIN() to treat usrWSz as a wide-character element count (not bytes) and adjust allocation/conversion sizes accordingly.
  • Fix SetupUserTokenWin() to set DomainName.MaximumLength based on DomainName.Length (not UserPrincipalName.Length).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants