[asterisk-commits] res/res pjsip t38: fix incorrect increment of media count (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 27 15:11:19 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5915 )
Change subject: res/res_pjsip_t38: fix incorrect increment of media_count
......................................................................
res/res_pjsip_t38: fix incorrect increment of media_count
The T38 sdp callback incorrectly has a side effect of incrementing
the media_count. This can lead to core dumps.
Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
---
M res/res_pjsip_t38.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index bb1641a..6019412 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -276,7 +276,7 @@
/* Move the image media stream to the front and have it as the only stream, pjmedia will fill in
* dummy streams for the rest
*/
- for (stream = 0; stream < sdp->media_count++; ++stream) {
+ for (stream = 0; stream < sdp->media_count; ++stream) {
if (!pj_strcmp2(&sdp->media[stream]->desc.media, "image")) {
sdp->media[0] = sdp->media[stream];
sdp->media_count = 1;
--
To view, visit https://gerrit.asterisk.org/5915
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
Gerrit-Change-Number: 5915
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Torrey Searle <tsearle at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170627/1fbb95d2/attachment.html>
More information about the asterisk-commits
mailing list