patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10145, ping.c in ping_send() sizeof...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10145: ping.c in ping_send() sizeof params type error

Submitted by:  quanjia <quanjia>
Submitted on:  Mon 22 Nov 2021 10:54:38 AM UTC
 
Category:  apps Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 24 Nov 2021 11:24:42 PM UTC, comment #1: 

Thanks, applied.

Erik Ekman <yarrick>
Project Member
Mon 22 Nov 2021 10:54:38 AM UTC, original submission:  

#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 */

quanjia <quanjia>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by yarrick (Posted a comment)
  • -email is unavailable- added by quanjia (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-24 yarrick StatusNone => Done
        Open/ClosedOpen => Closed
    2021-11-22 quanjia Attached File- => Added 0001-ping-sizeof-to-struct-not-pointer.patch, #52323

    Back to the top


    Powered by Savane 3.9