Todd Short 2b748d722b Fix use of OPENSSL_realloc in provider
Fix OPENSSL_realloc failure case; `provider->operation_bits` memory
is lost when `OPENSSL_realloc()` returns NULL.

`operation_bits_sz` is never set to the length of the allocated array.
This means that operation_bits is always reallocated in
`ossl_provider_set_operation_bit()`, possibly shrinking the array.
In addition, it means that the `memset()` always zeros out the
whole reallocated array, not just the new part. Also, because
`operation_bits_sz` is always zero, the value of `*result` in
`ossl_provider_test_operation_bit()` will always be zero.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/12760)
2020-09-02 15:21:11 -07:00
..
2020-08-29 17:40:11 +10:00
2020-07-16 14:47:04 +02:00
2020-04-23 13:55:52 +01:00
2020-08-06 13:22:30 +01:00
2019-10-10 14:12:15 +02:00
2020-04-23 13:55:52 +01:00
2020-08-29 17:40:11 +10:00
2019-09-28 20:26:35 +02:00
2020-08-28 19:21:29 +10:00
2020-08-09 17:34:52 +10:00
2020-08-19 13:27:31 +10:00
2020-07-24 22:53:27 +10:00
2020-08-29 17:40:11 +10:00
2020-04-23 13:55:52 +01:00
2019-11-12 13:30:35 +01:00
2019-10-10 14:12:15 +02:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-08-06 13:22:30 +01:00
2020-08-29 17:40:11 +10:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-08-29 17:40:11 +10:00
2020-08-07 14:29:00 +10:00
2019-12-18 14:46:01 +10:00
2019-10-10 14:12:15 +02:00
2020-06-04 14:33:57 +01:00
2020-08-26 14:04:17 +03:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2019-09-28 20:26:36 +02:00
2020-04-23 13:55:52 +01:00
2019-12-11 19:04:01 +01:00
2020-08-26 14:04:11 +03:00
2020-04-23 13:55:52 +01:00
2020-06-04 14:33:57 +01:00
2020-07-29 17:31:32 +10:00
2019-09-28 20:26:34 +02:00
2020-06-22 02:35:01 +02:00
2020-07-16 14:47:04 +02:00
2020-04-28 15:37:37 +02:00
2020-07-16 14:47:04 +02:00
2020-04-23 13:55:52 +01:00
2019-09-28 20:26:36 +02:00
2020-05-15 14:09:49 +01:00
2020-04-23 13:55:52 +01:00
2020-08-26 14:04:11 +03:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00
2020-05-15 14:09:49 +01:00
2020-04-23 13:55:52 +01:00
2020-07-16 14:47:04 +02:00
2019-07-01 13:32:46 -04:00
2020-04-23 13:55:52 +01:00
2020-04-23 13:55:52 +01:00