mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
QUIC: ngx_quic_buffer_t use-after-free protection.
Previously the last chain field of ngx_quic_buffer_t could still reference freed chains and buffers after calling ngx_quic_free_buffer(). While normally an ngx_quic_buffer_t object should not be used after freeing, resetting last_chain field would prevent a potential use-after-free.
This commit is contained in:
parent
376f12e40a
commit
0e7702e066
@ -648,6 +648,7 @@ ngx_quic_free_buffer(ngx_connection_t *c, ngx_quic_buffer_t *qb)
|
|||||||
ngx_quic_free_chain(c, qb->chain);
|
ngx_quic_free_chain(c, qb->chain);
|
||||||
|
|
||||||
qb->chain = NULL;
|
qb->chain = NULL;
|
||||||
|
qb->last_chain = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user