mirror of
https://github.com/sonertari/SSLproxy
synced 2024-11-02 15:40:19 +00:00
Fix NULL pointer dereference in bev write handler
Only manipulate other->bev if it is not NULL to avoid a NULL pointer
dereference in the proxy bufferevent write handler when only one
direction is fully established, for example during connection shutdown.
Reported by: @david-holonet
Introduced in: 2bcfaf4
Issue: #109
This commit is contained in:
parent
2bcfaf4b44
commit
17d753fc2d
@ -1664,7 +1664,7 @@ pxy_bev_writecb(struct bufferevent *bev, void *arg)
|
||||
}
|
||||
#endif /* DEBUG_PROXY */
|
||||
|
||||
if (!(bufferevent_get_enabled(other->bev) & EV_READ)) {
|
||||
if (other->bev && !(bufferevent_get_enabled(other->bev) & EV_READ)) {
|
||||
/* data source temporarily disabled;
|
||||
* re-enable and reset watermark to 0. */
|
||||
bufferevent_setwatermark(bev, EV_WRITE, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user