瀏覽代碼

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

Juha Heinanen 15 年之前
父節點
當前提交
26d735b5c8
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {