From: twisti Date: Tue, 21 Aug 2007 15:12:38 +0000 (+0000) Subject: * src/native/vm/java_lang_Object.c (wait): Check for ms < 0. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=b862e960b38ce33df0f502612352d674c7e7d30b;p=cacao.git * src/native/vm/java_lang_Object.c (wait): Check for ms < 0. --- diff --git a/src/native/vm/java_lang_Object.c b/src/native/vm/java_lang_Object.c index 191ed2448..b44aff166 100644 --- a/src/native/vm/java_lang_Object.c +++ b/src/native/vm/java_lang_Object.c @@ -120,6 +120,12 @@ void _Jv_java_lang_Object_wait(java_lang_Object *o, s8 ms, s4 ns) if (jvmti) jvmti_MonitorWaiting(true, o, ms); #endif + if (ms < 0) { +/* exceptions_throw_illegalargumentexception("argument out of range"); */ + exceptions_throw_illegalargumentexception(); + return; + } + #if defined(ENABLE_THREADS) lock_wait_for_object(&LLNI_field_direct(o, header), ms, ns); #endif