From: "Clark-williams, Zachary" <zachary.clark-williams@intel.com>
To: Michael Brown <mcb30@ipxe.org>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Luo, Heng" <heng.luo@intel.com>
Cc: Zachary Clark-Williams <zclarkw112@gmail.com>,
Maciej Rabeda <maciej.rabeda@linux.intel.com>
Subject: Re: [edk2-devel] [PATCH] NetworkPkg: Add WiFi profile sync protocol support
Date: Mon, 26 Sep 2022 17:39:22 +0000 [thread overview]
Message-ID: <CO6PR11MB56012E5BC9EEFF6AC5EEF06AC9529@CO6PR11MB5601.namprd11.prod.outlook.com> (raw)
In-Reply-To: <afc9ae7c-f2fb-132a-136c-7fa45ce1f20f@ipxe.org>
After reviewing the code that provides the password from AMT to the connection manager, in a later revision after this line was added, the password is assigned a null terminator in its conversion.
Meaning, these lines are no longer necessary.
I will update the patch and resend for submission.
Please feel free to review the rest of this patch in the mean time and provide feedback of any other misalignments to be changed.
Thanks,
Zack
-----Original Message-----
From: Michael Brown <mcb30@ipxe.org>
Sent: Monday, September 26, 2022 9:27 AM
To: devel@edk2.groups.io; Clark-williams, Zachary <zachary.clark-williams@intel.com>; Luo, Heng <heng.luo@intel.com>
Cc: Zachary Clark-Williams <zclarkw112@gmail.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>
Subject: Re: [edk2-devel] [PATCH] NetworkPkg: Add WiFi profile sync protocol support
On 26/09/2022 16:39, Clark-williams, Zachary wrote:
>>> + if (Profile->Password[StrLen (Profile->Password)] != '\0') {
>>> + Profile->Password[StrLen (Profile->Password)] = L'\0'; }
>>> +
>> I don't understand this change, StrLen returns the length of a Null-terminated Unicode string, it means "Profile->Password[StrLen (Profile->Password)]" should always be 0. Did you see exceptional case?
> Yes this is checking if the users entered password had a terminator on the end, if it doesn't we are adding it.
> During dev and testing we found a failure case if this was not tested and fixed.
No. StrLen() works by scanning the string until it finds a L'\0'
terminator. Your code is provably wrong.
I would suggest that you retest, and find the mistake in your testing process.
Michael
next prev parent reply other threads:[~2022-09-26 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 19:42 [PATCH] NetworkPkg: Add WiFi profile sync protocol support Clark-williams, Zachary
2022-09-26 7:37 ` [edk2-devel] " Heng Luo
2022-09-26 15:39 ` Clark-williams, Zachary
2022-09-26 16:27 ` Michael Brown
2022-09-26 17:39 ` Clark-williams, Zachary [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-07 1:31 Clark-williams, Zachary
2023-01-10 3:02 ` Wu, Jiaxin
2023-01-10 5:27 ` [edk2-devel] " Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO6PR11MB56012E5BC9EEFF6AC5EEF06AC9529@CO6PR11MB5601.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox