ref: b3cc83d39291d1d4f91bd899e5d7a085cfd5a924
parent: 4626cb5bbfff5c59335e4198e81abf2d619c57a5
author: mkf <mkf@cloud9p.org>
date: Sun May 19 13:36:42 EDT 2024
netclient: don't panic if token[0] is nil!
--- a/netclient.c
+++ b/netclient.c
@@ -102,7 +102,10 @@
msg->ntoken = i;
msg->tokens = tokens;
msg->err = Ok;
- if(!strcmp(tokens[0], "CONN"))
+
+ if(tokens[0] == nil)
+ msg->err = Err;
+ else if(!strcmp(tokens[0], "CONN"))
{
switch(*tokens[1])
{