Details
Description
In evalfunction.c:FnCallSelectServers I believe there is something wrong with the logic.
The following piece of code will assign a nullbyte to recvbuf[-1] if there is no message in the socket.
char recvbuf[CF_BUFSIZE]; ssize_t n_read = recv(sd, recvbuf, maxbytes, 0); if (n_read < 0) { /* maxbytes was checked earlier, but just make sure... */ assert((size_t) n_read < sizeof(recvbuf)); recvbuf[n_read] = '\0';
I believe the condition in the if statement should be (n_read >= 0) in stead of (n_read < 0)
This seems to only affect 3.18. In 3.15 and 3.12 the condition is (n_read != -1)