From c5cf1e50acea9a9806d5dac7825a9eefb9724dc8 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 22 Aug 2007 21:00:44 +0000 Subject: [PATCH] Don't crash when using realtime in chan_sip without an insecure setting in the database. (closes issue #10348, reported by link55, fixed by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80390 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 382a1f8f8a..5731d7ba1a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15713,6 +15713,10 @@ static void set_insecure_flags(struct ast_flags *flags, const char *value, int l { static int dep_insecure_very = 0; static int dep_insecure_yes = 0; + + if (ast_strlen_zero(value)) + return; + if (!strcasecmp(value, "very")) { ast_set_flag(flags, SIP_INSECURE_PORT | SIP_INSECURE_INVITE); if(!dep_insecure_very) { -- 2.47.3