mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-06 18:41:30 +00:00
Fixed bug #28519 (lwip_recvfrom bug with len > 65535)
This commit is contained in:
parent
39717b2d9d
commit
28f0bbd575
@ -33,6 +33,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2010-01-08: Simon Goldschmidt
|
||||||
|
* sockets.c: Fixed bug #28519 (lwip_recvfrom bug with len > 65535)
|
||||||
|
|
||||||
2010-01-08: Simon Goldschmidt
|
2010-01-08: Simon Goldschmidt
|
||||||
* dns.c: Copy hostname for DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1 since string
|
* dns.c: Copy hostname for DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1 since string
|
||||||
passed to dns_local_addhost() might be volatile
|
passed to dns_local_addhost() might be volatile
|
||||||
|
@ -477,7 +477,8 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
{
|
{
|
||||||
struct lwip_socket *sock;
|
struct lwip_socket *sock;
|
||||||
struct netbuf *buf;
|
struct netbuf *buf;
|
||||||
u16_t buflen, copylen, off = 0;
|
u16_t buflen, copylen;
|
||||||
|
int off = 0;
|
||||||
struct ip_addr *addr;
|
struct ip_addr *addr;
|
||||||
u16_t port;
|
u16_t port;
|
||||||
u8_t done = 0;
|
u8_t done = 0;
|
||||||
@ -526,7 +527,7 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
}
|
}
|
||||||
|
|
||||||
buflen = netbuf_len(buf);
|
buflen = netbuf_len(buf);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: buflen=%"U16_F" len=%"SZT_F" off=%"U16_F" sock->lastoffset=%"U16_F"\n",
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: buflen=%"U16_F" len=%"SZT_F" off=%d sock->lastoffset=%"U16_F"\n",
|
||||||
buflen, len, off, sock->lastoffset));
|
buflen, len, off, sock->lastoffset));
|
||||||
|
|
||||||
buflen -= sock->lastoffset;
|
buflen -= sock->lastoffset;
|
||||||
@ -583,7 +584,7 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
|
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s));
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s));
|
||||||
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%"U16_F"\n", port, off));
|
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off));
|
||||||
} else {
|
} else {
|
||||||
#if SOCKETS_DEBUG
|
#if SOCKETS_DEBUG
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
@ -598,7 +599,7 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
|||||||
|
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s));
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s));
|
||||||
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
ip_addr_debug_print(SOCKETS_DEBUG, addr);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%"U16_F"\n", port, off));
|
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off));
|
||||||
#endif /* SOCKETS_DEBUG */
|
#endif /* SOCKETS_DEBUG */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user