From 4b43b375b7abae22070cd86bfc26a8222233150e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 13:24:56 -0500 Subject: check for overlapping pointers --- src/threads/thrd_sleep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/threads/thrd_sleep.c') diff --git a/src/threads/thrd_sleep.c b/src/threads/thrd_sleep.c index cb8cd448..7ea445a2 100644 --- a/src/threads/thrd_sleep.c +++ b/src/threads/thrd_sleep.c @@ -6,6 +6,8 @@ int thrd_sleep(const struct timespec *duration, struct timespec *remaining) { SIGNAL_SAFE(0); + ASSERT_OVERLAP(duration, sizeof(*duration, remaining, sizeof(*remaining)); + return nanosleep(duration, remaining); } -- cgit v1.2.1