(krb5_generate_random_block): check return value from RAND_bytes

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16748 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-02-16 10:10:59 +00:00
parent a2cdaa4cb6
commit 5cebb7986f

View File

@@ -3789,7 +3789,8 @@ krb5_generate_random_block(void *buf, size_t len)
rng_initialized = 1;
}
HEIMDAL_MUTEX_unlock(&crypto_mutex);
RAND_bytes(buf, len);
if (RAND_bytes(buf, len) != 1)
krb5_abortx(NULL, "Failed to generate random block");
}
#else