preventing server from dying of invalid chars

This commit is contained in:
Václav Šmejkal 2023-02-20 17:13:02 +01:00
parent 7317e1da82
commit daf6258222
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -84,7 +84,7 @@ char *read_socket(int socket)
content_buffer = why2_calloc(content_size + 1, sizeof(char)); content_buffer = why2_calloc(content_size + 1, sizeof(char));
//READ FINAL MESSAGE //READ FINAL MESSAGE
if (recv(socket, content_buffer, content_size, 0) != content_size) why2_die("Reading socket failed!"); if (recv(socket, content_buffer, content_size, 0) != content_size) fprintf(stderr, "Socket probably read wrongly!\n");
return content_buffer; return content_buffer;
} }