lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #49264] Crash Error when LWIP_SOCKET_OFFSET is in use


From: Arpit Agarwal
Subject: [lwip-devel] [bug #49264] Crash Error when LWIP_SOCKET_OFFSET is in use
Date: Tue, 4 Oct 2016 08:41:43 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?49264>

                 Summary: Crash Error when LWIP_SOCKET_OFFSET is in use
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: arpit_iitg
            Submitted on: Tue 04 Oct 2016 08:41:40 AM GMT
                Category: sockets/netconn
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

Crash Error occur in lwip_socket_drop_registered_memberships API due to
LWIP_ASSERT condition fail when LWIP_SOCKET_OFFSET is in use.

The reason is the assert condition i.e. "sockets[s].conn" which still uses the
same value as passed in the function. I think this should have been adjusted
when LWIP_SOCKET_OFFSET is in use.

Similarly the socket descriptor value is not adjusted in
lwip_socket_register_membership / lwip_socket_unregister_membership APIs.

I suggest the following fix in all the three APIs mentioned:

s -= LWIP_SOCKET_OFFSET; //Code for fix

The Fix should be added in all the three API's at the very start, before any
processing.






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?49264>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]