From 6f1f4072afc14b5cd2487fe609330bb672e9905f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 23 Jan 2003 11:12:54 +0000 Subject: [PATCH] Fix segfault if current source didn't exist on fallback mount request. svn path=/trunk/icecast/; revision=4292 --- src/connection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/connection.c b/src/connection.c index 4918d17d..ce3e453b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -443,6 +443,11 @@ static void handle_fallback_request(client_t *client) source = source_find_mount(mount); avl_tree_unlock(global.source_tree); + if(source == NULL) { + client_send_400(client, "Current source not found"); + return; + } + old = source->fallback_mount; source->fallback_mount = strdup(value); free(old);