ssp example code bufferoverflow

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ssp example code bufferoverflow

1,051件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mattes on Thu Jan 06 20:50:05 MST 2011
I was building and testing the ssp example code for the lpcxpresso 1114 and discovered a bug in the code.

The while loop condition in LoopbackTest() is wrong
and creates a buffer overflow.

Where do I report this?

Mat

patch
-------------------------------------------
--- ssptest.c.orig      2011-01-06 19:44:36.000000000 -0800
+++ ssptest.c   2011-01-06 19:45:48.000000000 -0800
@@ -36,7 +36,7 @@
   GPIOSetValue( PORT0, 2, 0 );
#endif
   i = 0;
-  while ( i <= SSP_BUFSIZE )
+  while ( i < SSP_BUFSIZE )
   {
        /* to check the RXIM and TXIM interrupt, I send a block data at one time
        based on the FIFOSIZE(8). */
--------------------------------------------------
0 件の賞賛
返信
0 返答(返信)