Oops, typo.<div><br><div>What I wanted to say is &quot;in case the length of ssid in wps-&gt;ssid is longer than the one in credential&quot;.</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">&lt;<a href="mailto:johannes@sipsolutions.net">johannes@sipsolutions.net</a>&gt;</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>
&gt; From: Spencer Chang &lt;<a href="mailto:jungwalk@gmail.com">jungwalk@gmail.com</a>&gt;<br>
&gt;<br>
&gt; It is better to reset the ssid in WPS first before it is replaced with the one in<br>
&gt; credential in case the length of ssid in credential is longer than wps-&gt;ssid.<br>
<br>
</div><div class="im">&gt; +     os_memset(hapd-&gt;wps-&gt;ssid, 0, HOSTAPD_MAX_SSID_LEN);<br>
&gt;       os_memcpy(hapd-&gt;wps-&gt;ssid, cred-&gt;ssid, cred-&gt;ssid_len);<br>
&gt;       hapd-&gt;wps-&gt;ssid_len = cred-&gt;ssid_len;<br>
<br>
</div>That seems completely useless, in particular when it&#39;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>