Peter Wu 6d047e06e6 SSL_get_shared_sigalgs: handle negative idx parameter
When idx is negative (as is the case with do_print_sigalgs in
apps/s_cb.c), AddressSanitizer complains about a buffer overflow (read).
Even if the pointer is not dereferenced, this is undefined behavior.

Change the user not to use "-1" as index since the function is
documented to return 0 on out-of-range values.

Tested with `openssl s_server` and `curl -k https://localhost:4433`.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2349)
2017-02-09 09:48:46 +00:00
..
2017-02-08 11:41:45 +00:00
2016-11-04 12:09:45 +00:00
2017-02-08 02:16:27 +00:00
2016-11-04 12:09:45 +00:00
2017-01-30 10:18:24 +00:00
2016-11-28 12:23:36 +01:00
2017-02-02 14:45:10 +00:00
2016-08-18 14:02:29 +02:00
2017-02-08 02:16:26 +00:00
2016-08-18 14:02:29 +02:00
2016-09-07 16:08:38 -04:00
2017-01-09 22:26:47 -05:00
2016-11-13 16:24:02 -05:00
2017-02-08 02:16:27 +00:00
2017-02-08 02:16:27 +00:00
2016-08-18 14:02:29 +02:00