X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=net%2Fasterisk-13.x%2Fpatches%2F160-AST-2019-008-13.diff;fp=net%2Fasterisk-13.x%2Fpatches%2F160-AST-2019-008-13.diff;h=a72069fdb5d3e8de83f0a4aa48fe2c73c5ce72a0;hb=a2aef3164c9b2658b350ff59bf2cb64303f6b09b;hp=0000000000000000000000000000000000000000;hpb=8d24147c8ce3be4990458c85940b601ba92eb174;p=feed%2Ftelephony.git diff --git a/net/asterisk-13.x/patches/160-AST-2019-008-13.diff b/net/asterisk-13.x/patches/160-AST-2019-008-13.diff new file mode 100644 index 0000000..a72069f --- /dev/null +++ b/net/asterisk-13.x/patches/160-AST-2019-008-13.diff @@ -0,0 +1,35 @@ +From c257794330db49f4079a7108d51da60696269b36 Mon Sep 17 00:00:00 2001 +From: Ben Ford +Date: Fri, 08 Nov 2019 13:21:15 -0600 +Subject: [PATCH] res_pjsip_session.c: Check for port of zero on incoming SDP. + +If a re-invite comes in initiating T.38, but there is no c line in the +SDP and the port is also 0, a crash can occur. A check is now done on +the port to see if the steam is already declined, preventing the crash. +The logic was moved to res_pjsip_session.c because it is handled in a +similar manner in later versions of Asterisk. + +ASTERISK-28612 +Reported by: Salah Ahmed + +Change-Id: Ifc4a0d05b32c7f2156e77fc8435a6ecaa6abada0 +--- + +diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c +index 81f36a7..12cf41d 100644 +--- a/res/res_pjsip_session.c ++++ b/res/res_pjsip_session.c +@@ -235,6 +235,13 @@ + continue; + } + ++ /* If we have a port of 0, ignore this stream */ ++ if (!sdp->media[i]->desc.port) { ++ ast_debug(1, "Declining incoming SDP media stream '%s' at position '%d'\n", ++ session_media->stream_type, i); ++ continue; ++ } ++ + if (session_media->handler) { + handler = session_media->handler; + ast_debug(1, "Negotiating incoming SDP media stream '%s' using %s SDP handler\n",