session server BUGFIX invalid dereference
diff --git a/src/session_server.c b/src/session_server.c
index 45e669b..27e79fc 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -108,7 +108,8 @@
break;
}
for (j = 0; j < client->ch_endpt_count; ++j) {
- if (!strcmp(client->ch_endpts[j].name, endpt_name) && (!ti || (ti == client->ch_endpts[j].ti))) {
+ if ((!endpt_name || !strcmp(client->ch_endpts[j].name, endpt_name)) &&
+ (!ti || (ti == client->ch_endpts[j].ti))) {
endpt = &client->ch_endpts[j];
break;
}