mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
httpd: LWIP_HTTPD_POST_MANUAL_WND: fixed double-free when httpd_post_data_recved is called nested from httpd_post_receive_data() (bug #50424)
# Conflicts: # CHANGELOG
This commit is contained in:
parent
168fa1c38a
commit
fe6e1bd4af
@ -1692,7 +1692,14 @@ http_post_rxpbuf(struct http_state *hs, struct pbuf *p)
|
||||
hs->post_content_len_left -= p->tot_len;
|
||||
}
|
||||
}
|
||||
#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
|
||||
/* prevent connection being closed if httpd_post_data_recved() is called nested */
|
||||
hs->unrecved_bytes++;
|
||||
#endif
|
||||
err = httpd_post_receive_data(hs, p);
|
||||
#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
|
||||
hs->unrecved_bytes--;
|
||||
#endif
|
||||
if (err != ERR_OK) {
|
||||
/* Ignore remaining content in case of application error */
|
||||
hs->post_content_len_left = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user