diff options
author | tb <> | 2023-06-16 11:20:01 +0000 |
---|---|---|
committer | tb <> | 2023-06-16 11:20:01 +0000 |
commit | 3c634e1940d0eae384ff7716583caec4334afc3c (patch) | |
tree | 21eb74d981e0529d7918609ace8adad99112068b /src | |
parent | 0bcb6c7de733ac6e261836c48994a12b1afcaf49 (diff) | |
download | openbsd-3c634e1940d0eae384ff7716583caec4334afc3c.tar.gz openbsd-3c634e1940d0eae384ff7716583caec4334afc3c.tar.bz2 openbsd-3c634e1940d0eae384ff7716583caec4334afc3c.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ex_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: ex_data.c,v 1.20 2018/03/17 16:20:01 beck Exp $ */ | 1 | /* $OpenBSD: ex_data.c,v 1.21 2023/06/16 11:20:01 tb Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Overhaul notes; | 4 | * Overhaul notes; |
@@ -320,7 +320,7 @@ def_get_class(int class_index) | |||
320 | gen = malloc(sizeof(EX_CLASS_ITEM)); | 320 | gen = malloc(sizeof(EX_CLASS_ITEM)); |
321 | if (gen) { | 321 | if (gen) { |
322 | gen->class_index = class_index; | 322 | gen->class_index = class_index; |
323 | gen->meth_num = 0; | 323 | gen->meth_num = 1; |
324 | gen->meth = sk_CRYPTO_EX_DATA_FUNCS_new_null(); | 324 | gen->meth = sk_CRYPTO_EX_DATA_FUNCS_new_null(); |
325 | if (!gen->meth) | 325 | if (!gen->meth) |
326 | free(gen); | 326 | free(gen); |