[Asterisk-code-review] res pjsip transport websocket: Fix use-after-free bugs. (asterisk[master])

Ivan Poddubny asteriskteam at digium.com
Mon Jun 8 14:00:44 CDT 2015


Ivan Poddubny has posted comments on this change.

Change subject: res_pjsip_transport_websocket: Fix use-after-free bugs.
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.asterisk.org/#/c/598/3/res/res_pjsip_transport_websocket.c
File res/res_pjsip_transport_websocket.c:

Line 98: 		wstransport->ws_session = NULL;
> Setting the various parts of this structure to NULL won't really accomplish
That's how it's done in transports included in pjsip. It helps catching use-after-free errors earlier. If some other code has a reference to the transport that has not been counted, it would fail fast on a null pointer deference, which is way better that having a hard to find bug that is only visible when the memory has been overwritten with something else.


-- 
To view, visit https://gerrit.asterisk.org/598
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idc0b63eb6e459c1ddfb2430127d34b3c4d8d373b
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list