Commit Graph

8 Commits (511df14eb0419ded01888022959d6eeb8f32d6b4)

Author SHA1 Message Date
Max Payne bd47110554 Fix IPv4 address parsing due to not-so-portable scanf modifier
Bug is raised when using newlib-based toolchains.
%hh format is only avaliable in scanf if newlib is compiled
with _WANT_IO_C99_FORMATS option.
2018-04-02 23:33:21 +03:00
Tony Wu 70ad0f5226 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-04 11:02:34 +08:00
Christopher Haster 42105371ef 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-10-28 14:24:52 -05:00
Martin Kojtal ba47aa546b Merge pull request #2897 from geky/nsapi-consistent-unspec
nsapi - Standardize support of NSAPI_UNSPEC
2016-10-27 10:26:00 +02:00
Christopher Haster cce82b13ac nsapi - Fixed unaligned writes from <word-sized scanf calls 2016-10-19 16:49:35 -05:00
Christopher Haster bf83cb28cd nsapi - Fixed leftover bytes from suffix during ipv6 parsing
Thanks to @EduardPon for hunting this down
2016-10-19 15:28:32 -05:00
Christopher Haster 1f4eb0aaa1 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-05 12:48:10 -05: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