Silence an uninitialized variable false positive in GCC. When building with OPENSSL_NO_ASM, things are inlined enough that GCC figures out bn_reduce_once reads words, but not that bn_big_endian_to_words initializes the parts that are read. Change-Id: Id4d77cec6ca0782edd0d93022436bd307c2bba17 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/56826 Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c index 4e632e1..debb965 100644 --- a/crypto/fipsmodule/ec/ec.c +++ b/crypto/fipsmodule/ec/ec.c
@@ -1195,7 +1195,7 @@ // Additionally, one can manually check this property for built-in curves. It // is enforced for legacy custom curves in |EC_GROUP_set_generator|. const BIGNUM *order = &group->order; - BN_ULONG words[EC_MAX_WORDS + 1]; + BN_ULONG words[EC_MAX_WORDS + 1] = {0}; bn_big_endian_to_words(words, order->width + 1, bytes, len); bn_reduce_once(out->words, words, /*carry=*/words[order->width], order->d, order->width);