Module: sip-router
Branch: sr_3.0
Commit: 5a2e47f34f9ec178d0695841bc4fb41f3aa48a24
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5a2e47f…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Tue Apr 27 09:30:12 2010 +0300
modules/mediaproxy: crash fix
- Fixed crash when received reply contains more streams than the
INVITE. Credits to Sa�l Ibarra Corretg�.
---
modules/mediaproxy/mediaproxy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index bf4764e..4b314af 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -1533,7 +1533,7 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id)
}
}
- for (i=0, j=1; i<session.stream_count; i++) {
+ for (i=0, j=1; i<session.stream_count && j<len; i++) {
stream = session.streams[i];
if (stream.transport != TSupported) {
if (!stream.local_ip && removed_session_ip) {