Browse Source

modules/mediaproxy: crash fix
- Fixed crash when received reply contains more streams than the
INVITE. Credits to Sa�l Ibarra Corretg�.

Juha Heinanen 15 years ago
parent
commit
26d735b5c8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/mediaproxy/mediaproxy.c

+ 1 - 1
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) {