diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-29 20:55:44 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-30 19:56:44 +0900 |
commit | 37df6d9b8d3a8b34bec5346766ab8093c0f0fc26 (patch) | |
tree | dd3f93b797e66fb1113ad665ab259e028429cc82 /src/timesync | |
parent | 9365e296fe281da45797af89a97627e872fc019d (diff) | |
download | systemd-37df6d9b8d3a8b34bec5346766ab8093c0f0fc26.tar.gz |
timesync: check cmsg length
Diffstat (limited to 'src/timesync')
-rw-r--r-- | src/timesync/timesyncd-manager.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index d7f511ee22..d7060aaa45 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -471,6 +471,8 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re switch (cmsg->cmsg_type) { case SCM_TIMESTAMPNS: + assert(cmsg->cmsg_len == CMSG_LEN(sizeof(struct timespec))); + recv_time = (struct timespec *) CMSG_DATA(cmsg); break; } |