Skip to content

Commit

Permalink
properly terminate string which recvfrom does not do
Browse files Browse the repository at this point in the history
  • Loading branch information
gdepeyrot authored and Max Lv committed Jul 16, 2021
1 parent 49ead5e commit 0a7d178
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ manager_recv_cb(EV_P_ ev_io *w, int revents)
return;
}

// properly terminate string which recvfrom does not do
buf[r] = '\0';

char *action = get_action(buf, r);
if (action == NULL) {
return;
Expand Down

0 comments on commit 0a7d178

Please sign in to comment.