[asterisk-commits] res/res pjsip t38: fix incorrect increment of media count (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 28 16:16:52 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5914 )
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
Jenkins2: Verified
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 7643492..3028d35 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -278,7 +278,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/5914
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
Gerrit-Change-Number: 5914
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/20170628/bde70881/attachment.html>
More information about the asterisk-commits
mailing list