Hi Fabi,

I verified this in LwIP 1.4.1:

Here the source included to have a better view at the problem. The one you named in IGMP however I don't see. Because line 801 here contains 'IGMP_STATS_INC(igmp.memerr);'

Please fill in a bug report at https://savannah.nongnu.org/bugs/?group=lwip

[lwip\src\api\api_msg.c:225] -> [lwip\src\api\api_msg.c:227]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.

  LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);

  if (conn == NULL) {
    return ERR_VAL;
  }

[lwip\src\api\api_msg.c:320] -> [lwip\src\api\api_msg.c:326]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.
[lwip\src\api\api_msg.c:322] -> [lwip\src\api\api_msg.c:326]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.

  LWIP_ASSERT("conn != NULL", (conn != NULL));

  if (conn->state == NETCONN_WRITE) {
        do_writemore(conn);
  } else if (conn->state == NETCONN_CLOSE) {
        do_close_internal(conn);
  }

  if (conn) {


On 2013-02-07 12:55, Fabian Cenedese wrote:
Hi

There are a few places where variables are used without
checking (1) or even in case of NULL (2). I don't know if
the (1) errors really can occur but the code could check
anyway.

bye  Fabi

(1)
[lwip\src\api\api_msg.c:225] -> [lwip\src\api\api_msg.c:227]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.
[lwip\src\api\api_msg.c:320] -> [lwip\src\api\api_msg.c:326]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.
[lwip\src\api\api_msg.c:322] -> [lwip\src\api\api_msg.c:326]: (error)
Possible null pointer dereference: conn - otherwise it is redundant to
check it against null.

(2)
[lwip\src\core\ipv4\igmp.c:801]: (error) Possible null pointer
dereference: igmp


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to