We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95af95b commit 5f1e186Copy full SHA for 5f1e186
include/openssl/stack.h
@@ -505,7 +505,9 @@ BSSL_NAMESPACE_END
505
/* use 2-arg sk_*_find for OpenSSL compatibility */ \
506
OPENSSL_INLINE int sk_##name##_find(const STACK_OF(name) *sk, \
507
constptrtype p) { \
508
- const size_t mask = 0xffffffffffffffffUL << (sizeof(int) * 8); \
+ const size_t mask = sizeof(size_t) > sizeof(int) \
509
+ ? (~((size_t) 0)) << (sizeof(int) * 8) \
510
+ : 0; \
511
size_t out_index = 0; \
512
int ok = OPENSSL_sk_find((const OPENSSL_STACK *)sk, &out_index, \
513
(const void *)p, sk_##name##_call_cmp_func); \
0 commit comments