boringssl/crypto/stack
Doug Hogan 41846c74f1 Modify sk_find() so it returns 1 on success and 0 otherwise.
The 2 arg OpenSSL sk_find() returned -1 on error and >= 0 on
success.  BoringSSL's 3 arg sk_find() returns -1 if the sk argument
is NULL, 0 if the item is not found, and 1 if found.

In practice, all callers of the sk_find() macros in BoringSSL only
check for zero/non-zero.  If sk is ever NULL, it looks like most
callers are going to use uninitialized data as the index because
the return value check is insufficient.

Change-Id: I640089a0f4044aaa8d50178b2aecd9c3c1fe2f9c
Reviewed-on: https://boringssl-review.googlesource.com/4500
Reviewed-by: Adam Langley <agl@google.com>
2015-04-24 23:19:56 +00:00
..
CMakeLists.txt Change CMakeLists.txt to two-space indent. 2015-01-28 16:37:10 -08:00
make_macros.sh Add sk_deep_copy and its macro. 2015-02-13 10:59:10 -08:00
stack.c Modify sk_find() so it returns 1 on success and 0 otherwise. 2015-04-24 23:19:56 +00:00