prevent bogus name ownership
This commit is contained in:
parent
18ec9899f7
commit
438a1a85e8
1 changed files with 1 additions and 1 deletions
2
server.c
2
server.c
|
@ -133,7 +133,7 @@ int jb_server_client_assign_unique_name(struct jb_server *s, int i)
|
||||||
int jb_server_client_assign_own_name(struct jb_server *s, int i, char *name)
|
int jb_server_client_assign_own_name(struct jb_server *s, int i, char *name)
|
||||||
{
|
{
|
||||||
struct jb_client *c = &s->clients[i];
|
struct jb_client *c = &s->clients[i];
|
||||||
if (c->owned_name_index != -1) {
|
if (c->owned_name_index != -1 || !name || *name == ':' || *name == '\0') {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue