HomePhabricator

Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.

Description

Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.

Summary:
Most of the codebase correctly used short-cutting to avoid calling
_is_zero on possibly incompletely initialized elements, but a few
places were missed.

This is a backport of libsecp256k1 PR629

Test Plan:

make check

Reviewers: #bitcoin_abc, nakihito

Reviewed By: nakihito

Differential Revision: https://reviews.bitcoinabc.org/D5347