MCPcopy Create free account
hub / github.com/apache/httpd / ap_random_insecure_bytes

Function ap_random_insecure_bytes

server/core.c:5463–5478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5461}
5462
5463AP_DECLARE(void) ap_random_insecure_bytes(void *buf, apr_size_t size)
5464{
5465#if APR_HAS_THREADS
5466 if (rng_mutex)
5467 apr_thread_mutex_lock(rng_mutex);
5468#endif
5469 /* apr_random_insecure_bytes can only fail with APR_ENOTENOUGHENTROPY,
5470 * and we have ruled that out during initialization. Therefore we don't
5471 * need to check the return code.
5472 */
5473 apr_random_insecure_bytes(rng, buf, size);
5474#if APR_HAS_THREADS
5475 if (rng_mutex)
5476 apr_thread_mutex_unlock(rng_mutex);
5477#endif
5478}
5479
5480/*
5481 * Finding a random number in a range.

Callers 5

http_post_configFunction · 0.85
ap_proxy_share_balancerFunction · 0.85
unique_id_child_initFunction · 0.85
make_cookieFunction · 0.85
ap_random_pickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected