summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/err/err.c
diff options
context:
space:
mode:
authortb <>2024-11-02 12:46:36 +0000
committertb <>2024-11-02 12:46:36 +0000
commit18d63435aab73597d2a0cd7bef349030489065b9 (patch)
tree00dff4504fe7eaa807f75c71ee321d5f052d32b0 /src/lib/libcrypto/err/err.c
parentb5e79cb0c7e63e52ff53937b6156d4525d360b34 (diff)
downloadopenbsd-18d63435aab73597d2a0cd7bef349030489065b9.tar.gz
openbsd-18d63435aab73597d2a0cd7bef349030489065b9.tar.bz2
openbsd-18d63435aab73597d2a0cd7bef349030489065b9.zip
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
Diffstat (limited to 'src/lib/libcrypto/err/err.c')
-rw-r--r--src/lib/libcrypto/err/err.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index 8909c221e5..25fbb03875 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.c,v 1.74 2024/11/02 08:54:40 tb Exp $ */ 1/* $OpenBSD: err.c,v 1.75 2024/11/02 12:46:36 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -753,6 +753,7 @@ ERR_remove_thread_state(const CRYPTO_THREADID *id)
753{ 753{
754 ERR_STATE tmp; 754 ERR_STATE tmp;
755 755
756 OPENSSL_assert(id == NULL);
756 tmp.tid = pthread_self(); 757 tmp.tid = pthread_self();
757 758
758 /* 759 /*