Permalink
Browse files

Fixing buffer overflow issue

The TCP_MSS did not take into consideration the length of the RX indicate message coming from the ZeroG WiFi module. The fix changes the TCP_MSS
parameter to include this length.
  • Loading branch information...
1 parent 5191a3c commit 8ebe3d77d89f2953fef36baf40829936c1d47bc8 @asynclabs committed Jun 5, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 uipopt.h
View
@@ -336,7 +336,8 @@
* This is should not be to set to more than
* UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN.
*/
-#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)
+#define ZG_RX_HDR_LEN 17 // ZeroG G2100 RX Indicate header length
+#define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN - ZG_RX_HDR_LEN)
/**
* The size of the advertised receiver's window.

0 comments on commit 8ebe3d7

Please sign in to comment.