diff options
author | cheloha <> | 2021-12-02 20:58:01 +0000 |
---|---|---|
committer | cheloha <> | 2021-12-02 20:58:01 +0000 |
commit | bd634dd15594b3e9c78eb50c254cc44a25b8cba5 (patch) | |
tree | 191e970e7b56e3251dc8e76dc81ab926e791f089 /src/lib/libcrypto/evp/pmeth_lib.c | |
parent | b5d39b69357a51c124fee3d534973a83056efa7b (diff) | |
download | openbsd-bd634dd15594b3e9c78eb50c254cc44a25b8cba5.tar.gz openbsd-bd634dd15594b3e9c78eb50c254cc44a25b8cba5.tar.bz2 openbsd-bd634dd15594b3e9c78eb50c254cc44a25b8cba5.zip |
bsearch(3): support arrays with more than INT_MAX elements
The "lim" variable needs to be a size_t to match nmemb, otherwise we
get undefined behavior when nmemb exceeds INT_MAX.
Prompted by a blog post by Joshua Bloch:
https://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html
Fixed by Chris Torek a long time ago:
https://svnweb.freebsd.org/csrg/lib/libc/stdlib/bsearch.c?revision=51742&view=markup
ok millert@
Diffstat (limited to 'src/lib/libcrypto/evp/pmeth_lib.c')
0 files changed, 0 insertions, 0 deletions