diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-12-02 10:50:45 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-12-02 10:50:45 +0100 |
commit | 031083aed4431e98490930a30cea401ea0bed6cb (patch) | |
tree | 2412ef056832172a3e30e7356fbda600db8ec64d /lib/random.h | |
parent | b5c9fcca016278aac15ae424f35e60a560767ba9 (diff) | |
download | gnutls-031083aed4431e98490930a30cea401ea0bed6cb.tar.gz |
if the rnd structure doesn't provide check, _gnutls_rnd_check() will succeed
Diffstat (limited to 'lib/random.h')
-rw-r--r-- | lib/random.h | 5 |
1 files changed, 4 insertions, 1 deletions
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 |