Tried to fix but made things worse
This commit is contained in:
@@ -94,8 +94,8 @@ void* workerFunc(void *args){
|
||||
key_value_pair *head = NULL;
|
||||
key_value_pair *tail = NULL;
|
||||
|
||||
char request[MESSAGE_LENGTH]; // CHECK: off by one error
|
||||
int bytes_recv = zmq_recv(responder, request, MESSAGE_LENGTH - 1, 0);
|
||||
char request[MESSAGE_LENGTH + 1];
|
||||
int bytes_recv = zmq_recv(responder, request, MESSAGE_LENGTH, 0);
|
||||
if(bytes_recv <= 0){
|
||||
perror("Failed to receive request");
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user