Fix miscalculated size check
This commit is contained in:
parent
189b560efa
commit
71ace097f8
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ static int sendMessageAndForget(short ptype, short paylen, const void* payload)
|
|||
err = send(ctlSock, (char*) packet, sizeof(*packet) + paylen, 0);
|
||||
free(packet);
|
||||
|
||||
if (err != sizeof(*packet)) {
|
||||
if (err != sizeof(*packet) + paylen) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue