diff options
author | Omar Polo <op@omarpolo.com> | 2024-01-21 12:23:28 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-01-21 12:23:28 +0000 |
commit | 6dec2ad700aac233ab001f91b8fa05813180eaba (patch) | |
tree | ade12becb86ae1edd4c83a13d6382ea54e3470d3 /proc.c | |
parent | b03e976aa26d100ec1bf976dfdd005868395b490 (diff) |
convert most of gmid to the new imsg APIs
Makes parsing and handling of imsgs simpler / clearer. only crypto.c
is left as-is.
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -671,8 +671,8 @@ proc_dispatch(int fd, short event, void *arg) */ switch (imsg.hdr.type) { case IMSG_CTL_PROCFD: - IMSG_SIZE_CHECK(&imsg, &pf); - memcpy(&pf, imsg.data, sizeof(pf)); + if (imsg_get_data(&imsg, &pf, sizeof(pf))) + fatalx("bad length imsg CTL_PROCFD"); proc_accept(ps, imsg_get_fd(&imsg), pf.pf_procid, pf.pf_instance); break; |