client: bug: verify argv was sent correctly

We checked we had written 2 bytes (sizeof(len)), not <len> bytes.
This commit is contained in:
Daniel Eklöf 2019-11-02 00:01:16 +01:00
parent 570b3ac25a
commit 17024b4431
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -127,7 +127,7 @@ main(int argc, char *const *argv)
LOG_DBG("argv[%d] = %s (%hu)", i, argv[i], len);
if (send(fd, &len, sizeof(len), 0) != sizeof(len) ||
send(fd, argv[i], len, 0) != sizeof(len))
send(fd, argv[i], len, 0) != len)
{
LOG_ERRNO("failed to send argc/argv to server");
goto err;