[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #10145] ping.c in ping_send() sizeof params type err
From: |
quanjia |
Subject: |
[lwip-devel] [patch #10145] ping.c in ping_send() sizeof params type error |
Date: |
Mon, 22 Nov 2021 05:54:40 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 |
URL:
<https://savannah.nongnu.org/patch/?10145>
Summary: ping.c in ping_send() sizeof params type error
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: quanjia
Submitted on: Mon 22 Nov 2021 10:54:38 AM UTC
Category: apps
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
#if LWIP_IPV4
if(IP_IS_V4(addr)) {
struct sockaddr_in *to4 = (struct sockaddr_in*)&to;
to4->sin_len = sizeof(to4); <-----Should be sizeof(*to4)
to4->sin_family = AF_INET;
inet_addr_from_ip4addr(&to4->sin_addr, ip_2_ip4(addr));
}
#endif /* LWIP_IPV4 */
#if LWIP_IPV6
if(IP_IS_V6(addr)) {
struct sockaddr_in6 *to6 = (struct sockaddr_in6*)&to;
to6->sin6_len = sizeof(to6); <-----Should be sizeof(*to6)
to6->sin6_family = AF_INET6;
inet6_addr_from_ip6addr(&to6->sin6_addr, ip_2_ip6(addr));
}
#endif /* LWIP_IPV6 */
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 22 Nov 2021 10:54:38 AM UTC Name:
0001-ping-sizeof-to-struct-not-pointer.patch Size: 1KiB By: quanjia
<http://savannah.nongnu.org/patch/download.php?file_id=52323>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/patch/?10145>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [lwip-devel] [patch #10145] ping.c in ping_send() sizeof params type error,
quanjia <=