mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
patch #8008 Fix a potential null pointer dereference in assert
This commit is contained in:
parent
252126cf76
commit
097bc4c622
@ -80,6 +80,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2013-04-24: patch by Liam <morepork>
|
||||
api_msg.c: patch #8008 Fix a potential null pointer dereference in assert
|
||||
|
||||
2013-04-24: Simon Goldschmidt
|
||||
* igmp.c: fixed possible division by zero
|
||||
|
||||
|
@ -222,11 +222,12 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
|
||||
LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
|
||||
LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
|
||||
conn = (struct netconn *)arg;
|
||||
LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
|
||||
|
||||
if (conn == NULL) {
|
||||
return ERR_VAL;
|
||||
}
|
||||
LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
|
||||
|
||||
if (!sys_mbox_valid(&conn->recvmbox)) {
|
||||
/* recvmbox already deleted */
|
||||
if (p != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user