buglwIP - A Lightweight TCP/IP stack - Bugs: bug #54229, tcp.c, 679: extra check

 
 

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

bug #54229: tcp.c, 679: extra check

Submitter:  Andrey Vinogradov <andreyvinogradov>
Submitted:  Mon 02 Jul 2018 01:06:53 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.1.0
lwIP version:  git head

Mon 02 Jul 2018 06:38:50 PM UTC, comment #1: 

Fixed, thanks for reporting.
Also fixed in udp.c

Simon Goldschmidt <goldsimon>
Group administrator
Mon 02 Jul 2018 01:06:53 PM UTC, original submission:  


#if LWIP_IPV4
  /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
  if (ipaddr == NULL) {
    ipaddr = IP4_ADDR_ANY;
  }
#endif /* LWIP_IPV4 */

  /* still need to check for ipaddr == NULL in IPv6 only case */
  LWIP_ERROR("tcp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
  LWIP_ERROR("tcp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);

Probably need to put "ipaddr != NULL" check in #if !LWIP_IPV4...#endif case. It's written in comment anyway.

Andrey Vinogradov <andreyvinogradov>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by andreyvinogradov (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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.1.0

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code