mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-29 03:27:00 +08:00
api.h, api_lib.c, sockets.c: netbuf_ref doesn't check its internal pbuf_alloc call result and can cause a crash. lwip_send now check netbuf_ref result.
This commit is contained in:
@@ -82,7 +82,6 @@ struct netbuf {
|
||||
struct pbuf *p, *ptr;
|
||||
struct ip_addr *fromaddr;
|
||||
u16_t fromport;
|
||||
err_t err;
|
||||
};
|
||||
|
||||
struct netconn {
|
||||
@@ -111,7 +110,7 @@ struct netbuf * netbuf_new (void);
|
||||
void netbuf_delete (struct netbuf *buf);
|
||||
void * netbuf_alloc (struct netbuf *buf, u16_t size);
|
||||
void netbuf_free (struct netbuf *buf);
|
||||
void netbuf_ref (struct netbuf *buf,
|
||||
err_t netbuf_ref (struct netbuf *buf,
|
||||
const void *dataptr, u16_t size);
|
||||
void netbuf_chain (struct netbuf *head,
|
||||
struct netbuf *tail);
|
||||
|
||||
Reference in New Issue
Block a user