From a140a8edebd229fa89999b34286fdd71003ec5fd Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 16 Jul 2014 22:47:01 +1000 Subject: [PATCH] Set useragent to a zero length string if none is detected --- src/stratifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index 550d817e..0aa0123e 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1130,6 +1130,8 @@ static json_t *parse_subscribe(int client_id, json_t *params_val) buf = json_string_value(json_array_get(params_val, 0)); if (buf && strlen(buf)) client->useragent = strdup(buf); + else + client->useragent = ckzalloc(1); // Set to "" if (arr_size > 1) { /* This would be the session id for reconnect, it will * not work for clients on a proxied connection. */