[Asterisk-code-review] res/res pjsip t38: fix incorrect increment of media count (asterisk[master])
Sean Bright
asteriskteam at digium.com
Tue Jun 27 11:46:23 CDT 2017
Sean Bright has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/5915/1
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: newchange
Gerrit-Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
Gerrit-Change-Number: 5915
Gerrit-PatchSet: 1
Gerrit-Owner: 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-code-review/attachments/20170627/e225e05b/attachment.html>
More information about the asterisk-code-review
mailing list