diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-02 12:46:37 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-02 12:46:37 +0000 |
commit | 91d217eb9f378533def04d8ba85fe1cdfcd529ce (patch) | |
tree | 74b480cb2f18afa8b6b97b8d36a373f7dcfad2c6 | |
parent | 0c520c81346145e61f1c829de458bdc31a383fb5 (diff) |
Assert assumption on CRYPTO_THREADID
This type has been opaque for a while, and nobody should be able to call
this function with id != NULL. If they do, we want to know and it should
be noisy.
suggested by/ok jsing
-rw-r--r-- | lib/libcrypto/err/err.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/err/err.c b/lib/libcrypto/err/err.c index 8909c221e59..25fbb038759 100644 --- a/lib/libcrypto/err/err.c +++ b/lib/libcrypto/err/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.74 2024/11/02 08:54:40 tb Exp $ */ +/* $OpenBSD: err.c,v 1.75 2024/11/02 12:46:36 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -753,6 +753,7 @@ ERR_remove_thread_state(const CRYPTO_THREADID *id) { ERR_STATE tmp; + OPENSSL_assert(id == NULL); tmp.tid = pthread_self(); /* |