Tried to fix but made things worse

This commit is contained in:
Ano-sys
2025-01-29 23:22:57 +01:00
parent bc1fde1b9f
commit 4910b0db61
26 changed files with 8145 additions and 623 deletions
+2 -2
View File
@@ -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;