Commit 98a7a16e authored by gabrielC's avatar gabrielC Committed by Cedric Roux

bug fixes from Fujitsu (bug 21)

Note: this fix does not solve the issue with how
this buffer is used in this function, but I'm not
sure this code is used at all (Cédric Roux).

----------------------------------------------------------
bug 21

Ttile:
PAYLOAD_MAX=1500, so this coding results in index overflow.
Additionally, operator "!=" just compairs something, this
coding is meaningless.

Bug Location:
buffer[PAYLOAD_MAX] != '\0';

Note:
Detected by CppCheck
----------------------------------------------------------
parent bdaef795
...@@ -98,7 +98,7 @@ void *recv_ip4_tcp(void* csock) ...@@ -98,7 +98,7 @@ void *recv_ip4_tcp(void* csock)
LOG_I(OTG,"SOCKET:: TCP-IP4 :: size=%d received=%d, Received buffer: %s \n\n\n", strlen(buffer), sock_rcv, buffer); LOG_I(OTG,"SOCKET:: TCP-IP4 :: size=%d received=%d, Received buffer: %s \n\n\n", strlen(buffer), sock_rcv, buffer);
buffer[PAYLOAD_MAX] != '\0'; //buffer[PAYLOAD_MAX] != '\0';
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment