Added check for NULL message

master
Aadhavan Srinivasan 2 years ago
parent 6be0bd8ce2
commit 1456b60ad9

@ -108,6 +108,12 @@ int main() {
}
char* message = fetch_message_string(data);
if (message == NULL) {
printf("Invalid message.\n");
return -10;
}
printf("Your message is: %s\n",message);
close(conn_sockets[i]);

Loading…
Cancel
Save