Module: sip-router Branch: master Commit: a88811eb53692efcf5ef397d5c1563620d8ceabe URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a88811eb...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@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 c2d072c..d55b776 100644 --- a/modules/mediaproxy/mediaproxy.c +++ b/modules/mediaproxy/mediaproxy.c @@ -1664,7 +1664,7 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id, ice_candidate_data *ice_da } }
- 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) {