mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
client: bug: verify argv was sent correctly
We checked we had written 2 bytes (sizeof(len)), not <len> bytes.
This commit is contained in:
parent
570b3ac25a
commit
17024b4431
1 changed files with 1 additions and 1 deletions
2
client.c
2
client.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue