[awusb-linux-users] awusb_down bug
Brought to you by:
ragemaniac
|
From: Pat K. <pek...@ho...> - 2004-01-29 07:38:08
|
<html><div style='background-color:'><DIV class=RTE>I have created a bug report for the following problem:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>The awusb_down program does not convert<BR>firmware correctly because of a bug in the<BR>awusb_readhex function.<BR><BR>The bug is in the use of strlen in following code <BR>that tries to convert the read buff from ascii chars <BR>to binary inplace:<BR><BR>/* convert the buffer to the hex values */<BR> for (i = 0; i < strlen(buff); i++) {<BR> buff[i] = char2hex(buff[i]);<BR>}<BR><BR>The strlen function is used to find the length<BR>of a buffer that is being changed.<BR><BR>A quick fix is to add lines:<BR><BR>int slen; /* save strlen */<BR><BR>slen = strlen(buff);<BR><BR>and change the loop to:<BR><BR><BR>/* convert the buffer to the hex values */<BR> for (i = 0; i < slen; i++) {<BR> buff[i] = char2hex(buff[i]);<BR>}<BR><BR><BR>PEK<BR>---<BR><INPUT type=hidden value=76481 name=group_id></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2731??PS=">There are now three new levels of MSN Hotmail Extra Storage! Learn more.</a> </html>
|