From e989a86d338d6ff896ee0d00419c51458dee7b59 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Tue, 21 May 2019 10:55:54 -0700 Subject: [PATCH] properly handle bad input on windows clocks --- lib/wasi/src/syscalls/windows.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/wasi/src/syscalls/windows.rs b/lib/wasi/src/syscalls/windows.rs index b715d18c2..f6559290b 100644 --- a/lib/wasi/src/syscalls/windows.rs +++ b/lib/wasi/src/syscalls/windows.rs @@ -17,6 +17,7 @@ pub fn platform_clock_res_get( __WASI_CLOCK_THREAD_CPUTIME_ID => { return __WASI_EINVAL; } + _ => return __WASI_EINVAL, }; resolution.set(resolution_val); __WASI_ESUCCESS @@ -47,6 +48,7 @@ pub fn platform_clock_time_get( __WASI_CLOCK_THREAD_CPUTIME_ID => { unimplemented!("wasi::platform_clock_time_get(__WASI_CLOCK_THREAD_CPUTIME_ID, ..)") } + _ => return __WASI_EINVAL, }; time.set(nanos); __WASI_ESUCCESS