client segfault with crafted arguments
tamird@Mac socket_vmnet % $(brew --prefix socket_vmnet)/bin/socket_vmnet_client $(brew --prefix)/var/run/socket_vmnet --
zsh: segmentation fault $(brew --prefix socket_vmnet)/bin/socket_vmnet_client --
this is caused by the special handling of --:
https://github.com/lima-vm/socket_vmnet/blob/f486d475d4842bbddfe8f66ba09f7d1cb10cfbed/client/main.c#L36
I think the cleanest thing is to remove this. Typically -- is used to separate positional arguments from flags e.g. <cmd> --foo --bar -- pos1 pos2 but that is not how it works for the client.
-- is typically used to separate the command arguments from sub command arguments. For example kubectl exec pod -- command to exec inside the pod.
This is not really needed in the client, since our command is trivial, but it is nice to support this since users may already using this format. You are correct that the issue is not considering the special -- option - when we consume it we need to decrease argc, and fail if no argument left for execve().
This issue is possibly obsoleted by #76. The client can be removed after a deprecation period.