Oops, typo.<div><br><div>What I wanted to say is "in case the length of ssid in wps->ssid is longer than the one in credential".</div></div><div>Then, does this make more sense?</div><div>If it is, I will resend the patch.</div>
<br><div class="gmail_quote">2011/12/9 Johannes Berg <span dir="ltr"><<a href="mailto:johannes@sipsolutions.net">johannes@sipsolutions.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 2011-12-09 at 13:10 +0800, <a href="mailto:jungwalk@gmail.com">jungwalk@gmail.com</a> wrote:<br>
> From: Spencer Chang <<a href="mailto:jungwalk@gmail.com">jungwalk@gmail.com</a>><br>
><br>
> It is better to reset the ssid in WPS first before it is replaced with the one in<br>
> credential in case the length of ssid in credential is longer than wps->ssid.<br>
<br>
</div><div class="im">> + os_memset(hapd->wps->ssid, 0, HOSTAPD_MAX_SSID_LEN);<br>
> os_memcpy(hapd->wps->ssid, cred->ssid, cred->ssid_len);<br>
> hapd->wps->ssid_len = cred->ssid_len;<br>
<br>
</div>That seems completely useless, in particular when it's longer since then<br>
it will partially overwrite it anyway. They are binary data, not<br>
strings, after all.<br>
<font color="#888888"><br>
johannes<br>
<br>
</font></blockquote></div><br>