From 3c86832f9f271c8d479cf956155424fda512c76b Mon Sep 17 00:00:00 2001
From: "David M. Lee" <dlee@digium.com>
Date: Thu, 18 Jul 2013 18:05:07 +0000
Subject: [PATCH] Fixed null dereference when WebSocket subprotocol isn't
 specified

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 res/res_http_websocket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
index f4c44c4e90..129e92c192 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -630,7 +630,7 @@ int ast_websocket_uri_cb(struct ast_tcptls_session_instance *ser, const struct a
 			"Sec-WebSocket-Protocol: %s\r\n\r\n",
 			upgrade,
 			base64,
-			protocol);
+			protocol_handler->name);
 	} else {
 
 		/* Specification defined in http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 or completely unknown */
-- 
GitLab