X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Frand.c;h=1dcfc8d4077884a2d28723ed5c0331ff7d85180f;hb=HEAD;hp=eff2fff9851ced44e2155b2bd269729170ad6316;hpb=fe15af27f184fd043d1c8129b8c56a4f94125c89;p=mono.git diff --git a/mono/metadata/rand.c b/mono/metadata/rand.c index eff2fff9851..1dcfc8d4077 100644 --- a/mono/metadata/rand.c +++ b/mono/metadata/rand.c @@ -1,5 +1,6 @@ -/* - * rand.c: System.Security.Cryptography.RNGCryptoServiceProvider support +/** + * \file + * System.Security.Cryptography.RNGCryptoServiceProvider support * * Authors: * Mark Crichton (crichton@gimp.org) @@ -8,11 +9,13 @@ * * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com) * Copyright 2004-2009 Novell, Inc (http://www.novell.com) + * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #include #include "object.h" +#include "object-internals.h" #include "rand.h" #include "utils/mono-rand.h" @@ -32,8 +35,10 @@ ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_RngInitialize (M gpointer ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_RngGetBytes (gpointer handle, MonoArray *arry) { + MonoError error; g_assert (arry); - mono_rand_try_get_bytes (&handle, mono_array_addr (arry, guchar, 0), mono_array_length (arry)); + mono_rand_try_get_bytes (&handle, mono_array_addr (arry, guchar, 0), mono_array_length (arry), &error); + mono_error_set_pending_exception (&error); return handle; }