Skip to content

Commit f52fdf0

Browse files
committed
Add a null check on the channel name? (For #32)
1 parent c84978e commit f52fdf0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎mumble/channel.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ int channel_call(lua_State *l) {
385385
LinkNode* next_channel = channel->client->channel_list;
386386
while (next_channel != NULL) {
387387
MumbleChannel *chan = next_channel->data;
388-
if (chan != NULL && chan->channel_id != chan->parent && chan->parent == channel->channel_id && strcmp(pch, chan->name) == 0) {
388+
if (chan != NULL && chan->name != NULL
389+
&& chan->channel_id != chan->parent && chan->parent == channel->channel_id
390+
&& strcmp(pch, chan->name) == 0) {
389391
current = chan;
390392
}
391393
next_channel = next_channel->next;

0 commit comments

Comments
 (0)