From: Nikos Mavrogiannopoulos Date: Tue, 2 Dec 2014 09:50:45 +0000 (+0100) Subject: if the rnd structure doesn't provide check, _gnutls_rnd_check() will succeed X-Git-Tag: gnutls_3_4_0~535 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=031083aed4431e98490930a30cea401ea0bed6cb;p=thirdparty%2Fgnutls.git if the rnd structure doesn't provide check, _gnutls_rnd_check() will succeed --- diff --git a/lib/random.h b/lib/random.h index ee04549e55..59e3f3c0c4 100644 --- a/lib/random.h +++ b/lib/random.h @@ -50,7 +50,10 @@ int _gnutls_rnd_init(void); inline static int _gnutls_rnd_check(void) { - return _gnutls_rnd_ops.check(gnutls_rnd_ctx); + if (_gnutls_rnd_ops.check) + return _gnutls_rnd_ops.check(gnutls_rnd_ctx); + else + return 0; } #ifndef _WIN32