From 91d217eb9f378533def04d8ba85fe1cdfcd529ce Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Sat, 2 Nov 2024 12:46:37 +0000 Subject: 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 --- lib/libcrypto/err/err.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); /* -- cgit v1.2.3