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

Details

Provenance
Gregory Maxwell <greg@xiph.org>Authored on May 26 2019, 10:22
deadalnixCommitted on Feb 28 2020, 01:39
deadalnixPushed on Feb 28 2020, 01:39
Reviewer
nakihito
Differential Revision
D5347: Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.
Parents
rABCf6b2ace37ed7: Add a descriptive comment for secp256k1_ecmult_const.
Branches
Unknown
Tags
Unknown