From 3c634e1940d0eae384ff7716583caec4334afc3c Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 16 Jun 2023 11:20:01 +0000 Subject: Fix CRYPTO_get_ex_new_index() to return 1 or higher Mixing SSL_{get,set}_ex_data() and and SSL_{get,set}_app_data() in the same application causes problems since they both place their data at the same spot. From Marc Aldorasi ok jsing --- src/lib/libcrypto/ex_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/ex_data.c b/src/lib/libcrypto/ex_data.c index b1e3913662..0a9c59121f 100644 --- a/src/lib/libcrypto/ex_data.c +++ b/src/lib/libcrypto/ex_data.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_data.c,v 1.20 2018/03/17 16:20:01 beck Exp $ */ +/* $OpenBSD: ex_data.c,v 1.21 2023/06/16 11:20:01 tb Exp $ */ /* * Overhaul notes; @@ -320,7 +320,7 @@ def_get_class(int class_index) gen = malloc(sizeof(EX_CLASS_ITEM)); if (gen) { gen->class_index = class_index; - gen->meth_num = 0; + gen->meth_num = 1; gen->meth = sk_CRYPTO_EX_DATA_FUNCS_new_null(); if (!gen->meth) free(gen); -- cgit v1.2.3-55-g6feb