From eb6813cce3e887ef94ee5763aa47b741d931bfa7 Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Wed, 22 Aug 2007 21:03:27 +0000
Subject: [PATCH] Merged revisions 80390 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80390 | russell | 2007-08-22 16:00:44 -0500 (Wed, 22 Aug 2007) | 3 lines

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/trunk@80391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ba6b4ba9d9..7fc3559e31 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -16841,6 +16841,9 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
 
 static void set_insecure_flags (struct ast_flags *flags, const char *value, int lineno)
 {
+	if (ast_strlen_zero(value))
+		return;
+
 	if (!ast_false(value)) {
 		char buf[64];
 		char *word, *next;
-- 
GitLab