]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Assert that timeout >= 0 in _dbus_platform_condvar_wait_timeout
authorGleb Popov <6yearold@gmail.com>
Wed, 7 May 2025 21:58:06 +0000 (00:58 +0300)
committerSimon McVittie <smcv@collabora.com>
Fri, 16 May 2025 10:26:23 +0000 (10:26 +0000)
dbus/dbus-sysdeps-pthread.c

index f9c25604ef4e7168755d73711b71a8adca8dfe2b..3955a0d3f375b9c00ffcc9a97801f3c8673d61c1 100644 (file)
@@ -229,6 +229,8 @@ _dbus_platform_condvar_wait_timeout (DBusCondVar               *cond,
   struct timespec end_time;
   int result;
 
+  _dbus_assert (timeout_milliseconds >= 0);
+
 #ifdef HAVE_MONOTONIC_CLOCK
   if (have_monotonic_clock)
     {