[Asterisk-code-review] res/res pjsip t38: fix incorrect increment of media count (asterisk[13])
Jenkins2
asteriskteam at digium.com
Tue Jun 27 15:01:21 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5913 )
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
Jenkins2: Approved for Submit
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 0ce6474..4e76ac3 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/5913
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
Gerrit-Change-Number: 5913
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170627/99a54bec/attachment.html>
More information about the asterisk-code-review
mailing list