asn1/tasn_utl.c: fix logical error in and overhaul asn1_do_lock.
authorAndy Polyakov <appro@openssl.org>
Tue, 31 Jul 2018 12:59:14 +0000 (14:59 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 1 Aug 2018 14:07:24 +0000 (16:07 +0200)
commit680b9d45b005c2d0a48fd574db903bf4486b49ae
tree2cf9e6b39dcc8bd3c82afc5fc65455ede8e6fe16
parentf52292be10cb42c25ae83be969d3ad469ea7cb4e
asn1/tasn_utl.c: fix logical error in and overhaul asn1_do_lock.

CRYPTO_atomic_add was assumed to return negative value on error, while
it returns 0.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/asn1/tasn_utl.c