diff options
author | Pavel Stetsuk <pstetsuk@gmail.com> | 2023-09-14 22:05:49 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-10-18 16:39:34 +0200 |
commit | a47fc4ed401da4e2d84e035cc4add566e85b03d0 (patch) | |
tree | 7e1e37476e91c3a4637cb94c58a1108ce5bfe878 /crypto/objects | |
parent | rsa: Accept NULL OAEP label for backward compatibility (diff) | |
download | openssl-a47fc4ed401da4e2d84e035cc4add566e85b03d0.tar.xz openssl-a47fc4ed401da4e2d84e035cc4add566e85b03d0.zip |
fix: LINEAR search doesn't work properly (if CHARSET_EBCDIC is defined)
CLA: trivial
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22108)
Diffstat (limited to 'crypto/objects')
-rw-r--r-- | crypto/objects/obj_dat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 2c1a288167..209059aa7c 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -677,13 +677,14 @@ const void *OBJ_bsearch_ex_(const void *key, const void *base, int num, if (p == NULL) { const char *base_ = base; int l, h, i = 0, c = 0; + char *p1; for (i = 0; i < num; ++i) { - p = &(base_[i * size]); - c = (*cmp) (key, p); + p1 = &(base_[i * size]); + c = (*cmp) (key, p1); if (c == 0 || (c < 0 && (flags & OBJ_BSEARCH_VALUE_ON_NOMATCH))) - return p; + return p1; } } #endif |