Browse Source

Proxy: Catch invalid usernames and error

Luke Dashjr 12 years ago
parent
commit
62e8e51eea
1 changed files with 3 additions and 0 deletions
  1. 3 0
      driver-proxy.c

+ 3 - 0
driver-proxy.c

@@ -69,6 +69,9 @@ struct proxy_client *proxy_find_or_create_client(const char *username)
 	char *user;
 	int b;
 	
+	if (!username)
+		return NULL;
+	
 	mutex_lock(&proxy_clients_mutex);
 	HASH_FIND_STR(proxy_clients, username, client);
 	if (!client)