[sr-dev] git:kamailio_3.0: modules/mediaproxy: crash fix
Juha Heinanen
jh at tutpro.com
Tue Apr 27 08:37:23 CEST 2010
Module: sip-router
Branch: kamailio_3.0
Commit: 26d735b5c8b9f10d8a5d4f6a80ce12868868b187
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=26d735b5c8b9f10d8a5d4f6a80ce12868868b187
Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at 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) {
More information about the sr-dev
mailing list