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

NetworkPkg: Correct the length of EAP Identity when in ASCII format #4561

Closed
wants to merge 1 commit into from

Conversation

liyi77
Copy link
Contributor

@liyi77 liyi77 commented Jun 20, 2023

FIX: https://bugzilla.tianocore.org/show_bug.cgi?id=4477

Tls connection fail over WiFi in AMT OCR flow due to invalid identity.

This was due to missing conversion between unicode and ascii string which resulted in invalid strlen.

Cc: Maciej Rabeda maciej.rabeda@linux.intel.com
Cc: Siyuan Fu siyuan.fu@intel.com

FIX: https://bugzilla.tianocore.org/show_bug.cgi?id=4477

Tls connection fail over WiFi in AMT OCR flow due to invalid identity.

This was due to missing conversion between unicode and ascii
string which resulted in invalid strlen.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Zachary Clark-Williams <zachary.clark-williams@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Copy link
Contributor

@Zclarkwilliams Zclarkwilliams left a comment

Choose a reason for hiding this comment

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

update comments to align with rest of file comments, both single and multi-line comments.

Identity = AllocateZeroPool (IdentitySize);
Status = gBS->LocateProtocol (&gEdkiiWiFiProfileSyncProtocolGuid, NULL, (VOID **)&WiFiProfileSyncProtocol);
if (!EFI_ERROR (Status)) {
/* Max size of EapIdentity ::= sizeof (CHAR16) * sizeof (Profile->EapIdentity) ::= 2 * EAP_IDENTITY_SIZE */
Copy link
Contributor

Choose a reason for hiding this comment

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

please match the comment style found in this file with
//
// comment
//

/* The size of Identity from Username may equal
to the max size of EapIdentity(EAP_IDENTITY_SIZE*2=128 bytes),
so here only valid characters except NULL characters are copied. */
CopyMem (Identity, &Profile->EapIdentity, IdentitySize - 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

please match the comment style found in this file with
//
// comment
// comment cont.
//

@mergify
Copy link

mergify bot commented Jul 24, 2023

PR can not be merged due to conflict. Please rebase and resubmit

@liyi77 liyi77 closed this Jul 24, 2023
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.

None yet

2 participants