]> git.ipfire.org Git - thirdparty/openssl.git/commit
sleep.c: Limit the sleep time instead of sleeping for days or even years
authorTomas Mraz <tomas@openssl.org>
Fri, 17 Mar 2023 11:16:33 +0000 (12:16 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Sat, 18 Mar 2023 18:04:58 +0000 (19:04 +0100)
commitbea92b8c3d61960a2d06f8d342ef01d30a2fa195
tree23efa92fd046409c1f670d4ff97f04c015cd6fe2
parent46ce0854db51e373ab6ed4982431349107cd9b6d
sleep.c: Limit the sleep time instead of sleeping for days or even years

As the sleep() call is interruptible, it is not even a good idea to call
it in a loop if the caller uses some ridiculously large value as an
infinity just waiting for an interrupt.

Fixes #20524

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/20533)
crypto/sleep.c
doc/man3/OSSL_sleep.pod