Commit Graph

6 Commits (16bba05f4ec83fd8474fe03df012cb76e98bd682)

Author SHA1 Message Date
Tony Wu 81d667e1f3 netsocket - Fix set_ip_bytes out-of-bound access
set_ip_bytes() does a 16-byte memcpy from the input buffer to
the local nsapi_addr_t despite the address version.

If the address version is ipv4, the input buffer may only be
4-byte in size. This causes a out-of-bound access on the input buffer.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-11-18 12:18:25 +00:00
Christopher Haster 7efae2ebc9 lwip/nsapi - Cleaned up warnings in network code
- cc.h@57,1: "BYTE_ORDER" redefined
- lwip_inet_chksum.c@560,44: passing argument 1 of 'thumb2_checksum'
  discards 'const' qualifier from pointer target type
- lwip_pbuf.c@1172,9: variable 'err' set but not used
- SocketAddress.cpp@293,1: control reaches end of non-void function
2016-11-08 10:43:50 +00:00
Christopher Haster 1703ed38c9 nsapi - Standardized support of NSAPI_UNSPEC
- Reordered nsapi_version_t to make defaule nsapi_addr_t NSAPI_UNSPEC
- Added support to NSAPI_UNSPEC in SocketAddress
2016-10-27 11:13:44 +01:00
Christopher Haster 20e97b0312 nsapi - Fixed unaligned writes from <word-sized scanf calls 2016-10-27 11:12:58 +01:00
Christopher Haster 8dcbf63bb6 nsapi - Fixed leftover bytes from suffix during ipv6 parsing
Thanks to @EduardPon for hunting this down
2016-10-27 11:12:55 +01:00
Christopher Haster ba99a1f31d restructure - Restructured features/net directory
features/net/network-socket -> features/netsocket
features/net/FEATURE_IPV4 -> features/FEATURE_LWIP
features/net/nanostack-binaries -> features/nanostack
features/net/FEATURE_NANOSTACK -> features/nanostack/FEATURE_NANOSTACK
2016-09-30 19:18:09 -05:00